<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP
           , GHCForeignImportPrim
           , NoImplicitPrelude
           , MagicHash
           , UnboxedTuples
           , UnliftedFFITypes
  #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE CApiFFI #-}</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- We believe we could deorphan this module, by moving lots of things</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- around, but we haven't got there yet:</span><span>
</span><span id="line-12"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-orphans #-}</span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# OPTIONS_HADDOCK not-home #-}</span><span>
</span><span id="line-14"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Module      :  GHC.Float</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 1994-2002</span><span>
</span><span id="line-20"></span><span class="hs-comment">--                Portions obtained from hbc (c) Lennart Augusstson</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-22"></span><span class="hs-comment">--</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- Maintainer  :  cvs-ghc@haskell.org</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- Portability :  non-portable (GHC Extensions)</span><span>
</span><span id="line-26"></span><span class="hs-comment">--</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- The types 'Float' and 'Double', the classes 'Floating' and 'RealFloat' and</span><span>
</span><span id="line-28"></span><span class="hs-comment">-- casting between Word32 and Float and Word64 and Double.</span><span>
</span><span id="line-29"></span><span class="hs-comment">--</span><span>
</span><span id="line-30"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span class="hs-cpp">

#include &quot;ieee-flpt.h&quot;
</span><span class="hs-cpp">#include &quot;MachDeps.h&quot;
</span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 32
</span><span class="hs-cpp"># define WSHIFT 5
</span><span class="hs-cpp"># define MMASK 31
</span><span class="hs-cpp">#elif WORD_SIZE_IN_BITS == 64
</span><span class="hs-cpp"># define WSHIFT 6
</span><span class="hs-cpp"># define MMASK 63
</span><span class="hs-cpp">#else
</span><span class="hs-cpp"># error unsupported WORD_SIZE_IN_BITS
</span><span class="hs-cpp">#endif
</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Float</span><span>
</span><span id="line-47"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Float.html"><span class="hs-identifier">GHC.Float</span></a></span><span>
</span><span id="line-48"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier">Float</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier">Double</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Float%23"><span class="hs-identifier">Float#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier">Double#</span></a></span><span>
</span><span id="line-49"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#double2Int"><span class="hs-identifier">double2Int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Double"><span class="hs-identifier">int2Double</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#float2Int"><span class="hs-identifier">float2Int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Float"><span class="hs-identifier">int2Float</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Monomorphic equality operators</span></span><span>
</span><span id="line-52"></span><span>    </span><span class="annot"><span class="hs-comment">-- | See GHC.Classes#matching_overloaded_methods_in_rules</span></span><span>
</span><span id="line-53"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#eqFloat"><span class="hs-identifier">eqFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#eqDouble"><span class="hs-identifier">eqDouble</span></a></span><span>
</span><span id="line-54"></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Bits.html"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Enum.html"><span class="hs-identifier">GHC.Enum</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Arr.html"><span class="hs-identifier">GHC.Arr</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html"><span class="hs-identifier">GHC.Float.RealFracMethods</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Float.ConversionUtils.html"><span class="hs-identifier">GHC.Float.ConversionUtils</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.BigNat.html#"><span class="hs-identifier">GHC.Num.BigNat</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">8</span><span>  </span><span class="annot"><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-type">**</span></a></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- $setup</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- &gt;&gt;&gt; import Prelude</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- Standard numeric classes</span><span>
</span><span id="line-78"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- | Trigonometric and hyperbolic functions and related functions.</span><span>
</span><span id="line-81"></span><span class="hs-comment">--</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- The Haskell Report defines no laws for 'Floating'. However, @('+')@, @('*')@</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- and 'exp' are customarily expected to define an exponential field and have</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- the following properties:</span><span>
</span><span id="line-85"></span><span class="hs-comment">--</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- * @exp (a + b)@ = @exp a * exp b@</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- * @exp (fromInteger 0)@ = @fromInteger 1@</span><span>
</span><span id="line-88"></span><span class="hs-comment">--</span><span>
</span><span id="line-89"></span><span class="hs-keyword">class</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="Floating"><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-var">Floating</span></a></span></span><span> </span><span id="local-6989586621679500288"><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-90"></span><span>    </span><span id="pi"><span class="annot"><a href="GHC.Float.html#pi"><span class="hs-identifier hs-type">pi</span></a></span></span><span>                  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-91"></span><span>    </span><span id="exp"><span class="annot"><a href="GHC.Float.html#exp"><span class="hs-identifier hs-type">exp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="log"><span class="annot"><a href="GHC.Float.html#log"><span class="hs-identifier hs-type">log</span></a></span></span><span class="hs-special">,</span><span> </span><span id="sqrt"><span class="annot"><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-type">sqrt</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-92"></span><span>    </span><span id="%2A%2A"><span class="annot"><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-type">(**)</span></a></span></span><span class="hs-special">,</span><span> </span><span id="logBase"><span class="annot"><a href="GHC.Float.html#logBase"><span class="hs-identifier hs-type">logBase</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-93"></span><span>    </span><span id="sin"><span class="annot"><a href="GHC.Float.html#sin"><span class="hs-identifier hs-type">sin</span></a></span></span><span class="hs-special">,</span><span> </span><span id="cos"><span class="annot"><a href="GHC.Float.html#cos"><span class="hs-identifier hs-type">cos</span></a></span></span><span class="hs-special">,</span><span> </span><span id="tan"><span class="annot"><a href="GHC.Float.html#tan"><span class="hs-identifier hs-type">tan</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-94"></span><span>    </span><span id="asin"><span class="annot"><a href="GHC.Float.html#asin"><span class="hs-identifier hs-type">asin</span></a></span></span><span class="hs-special">,</span><span> </span><span id="acos"><span class="annot"><a href="GHC.Float.html#acos"><span class="hs-identifier hs-type">acos</span></a></span></span><span class="hs-special">,</span><span> </span><span id="atan"><span class="annot"><a href="GHC.Float.html#atan"><span class="hs-identifier hs-type">atan</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-95"></span><span>    </span><span id="sinh"><span class="annot"><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-type">sinh</span></a></span></span><span class="hs-special">,</span><span> </span><span id="cosh"><span class="annot"><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-type">cosh</span></a></span></span><span class="hs-special">,</span><span> </span><span id="tanh"><span class="annot"><a href="GHC.Float.html#tanh"><span class="hs-identifier hs-type">tanh</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span id="asinh"><span class="annot"><a href="GHC.Float.html#asinh"><span class="hs-identifier hs-type">asinh</span></a></span></span><span class="hs-special">,</span><span> </span><span id="acosh"><span class="annot"><a href="GHC.Float.html#acosh"><span class="hs-identifier hs-type">acosh</span></a></span></span><span class="hs-special">,</span><span> </span><span id="atanh"><span class="annot"><a href="GHC.Float.html#atanh"><span class="hs-identifier hs-type">atanh</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-comment">-- | @'log1p' x@ computes @'log' (1 + x)@, but provides more precise</span><span>
</span><span id="line-99"></span><span>    </span><span class="hs-comment">-- results for small (absolute) values of @x@ if possible.</span><span>
</span><span id="line-100"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-101"></span><span>    </span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-102"></span><span>    </span><span id="log1p"><span class="annot"><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-type">log1p</span></a></span></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span>    </span><span class="hs-comment">-- | @'expm1' x@ computes @'exp' x - 1@, but provides more precise</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-comment">-- results for small (absolute) values of @x@ if possible.</span><span>
</span><span id="line-106"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-107"></span><span>    </span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-108"></span><span>    </span><span id="expm1"><span class="annot"><a href="GHC.Float.html#expm1"><span class="hs-identifier hs-type">expm1</span></a></span></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-comment">-- | @'log1pexp' x@ computes @'log' (1 + 'exp' x)@, but provides more</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-comment">-- precise results if possible.</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-113"></span><span>    </span><span class="hs-comment">-- Examples:</span><span>
</span><span id="line-114"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-115"></span><span>    </span><span class="hs-comment">-- * if @x@ is a large negative number, @'log' (1 + 'exp' x)@ will be</span><span>
</span><span id="line-116"></span><span>    </span><span class="hs-comment">--   imprecise for the reasons given in 'log1p'.</span><span>
</span><span id="line-117"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-comment">-- * if @'exp' x@ is close to @-1@, @'log' (1 + 'exp' x)@ will be</span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-comment">--   imprecise for the reasons given in 'expm1'.</span><span>
</span><span id="line-120"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-122"></span><span>    </span><span id="log1pexp"><span class="annot"><a href="GHC.Float.html#log1pexp"><span class="hs-identifier hs-type">log1pexp</span></a></span></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-comment">-- | @'log1mexp' x@ computes @'log' (1 - 'exp' x)@, but provides more</span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-comment">-- precise results if possible.</span><span>
</span><span id="line-126"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-comment">-- Examples:</span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-129"></span><span>    </span><span class="hs-comment">-- * if @x@ is a large negative number, @'log' (1 - 'exp' x)@ will be</span><span>
</span><span id="line-130"></span><span>    </span><span class="hs-comment">--   imprecise for the reasons given in 'log1p'.</span><span>
</span><span id="line-131"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-132"></span><span>    </span><span class="hs-comment">-- * if @'exp' x@ is close to @1@, @'log' (1 - 'exp' x)@ will be</span><span>
</span><span id="line-133"></span><span>    </span><span class="hs-comment">--   imprecise for the reasons given in 'expm1'.</span><span>
</span><span id="line-134"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-136"></span><span>    </span><span id="log1mexp"><span class="annot"><a href="GHC.Float.html#log1mexp"><span class="hs-identifier hs-type">log1mexp</span></a></span></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500288"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">**</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-139"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#logBase"><span class="hs-pragma hs-type">logBase</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-140"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#sqrt"><span class="hs-pragma hs-type">sqrt</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-141"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#tan"><span class="hs-pragma hs-type">tan</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#tanh"><span class="hs-pragma hs-type">tanh</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-143"></span><span>    </span><span id="local-6989586621679500073"><span id="local-6989586621679500066"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500066"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-var hs-var">**</span></a></span><span> </span><span id="local-6989586621679500065"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500065"><span class="hs-identifier hs-var">y</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500066"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500065"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-144"></span><span>    </span><span id="local-6989586621679500063"><span class="annot"><a href="GHC.Float.html#logBase"><span class="hs-identifier hs-var hs-var">logBase</span></a></span><span> </span><span id="local-6989586621679500058"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500058"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679500057"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500057"><span class="hs-identifier hs-var">y</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500057"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500058"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-145"></span><span>    </span><span id="local-6989586621679500055"><span class="annot"><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var hs-var">sqrt</span></a></span><span> </span><span id="local-6989586621679500051"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500051"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500051"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Floating a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-var">**</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0.5</span></span></span><span>
</span><span id="line-146"></span><span>    </span><span id="local-6989586621679500050"><span class="annot"><a href="GHC.Float.html#tan"><span class="hs-identifier hs-var hs-var">tan</span></a></span><span>  </span><span id="local-6989586621679500045"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500045"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500045"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500045"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679500044"><span class="annot"><a href="GHC.Float.html#tanh"><span class="hs-identifier hs-var hs-var">tanh</span></a></span><span> </span><span id="local-6989586621679500039"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500039"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500039"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500039"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1p"><span class="hs-pragma hs-type">log1p</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-150"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#expm1"><span class="hs-pragma hs-type">expm1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-151"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1pexp"><span class="hs-pragma hs-type">log1pexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-152"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1mexp"><span class="hs-pragma hs-type">log1mexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-153"></span><span>    </span><span id="local-6989586621679500038"><span class="annot"><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var hs-var">log1p</span></a></span><span> </span><span id="local-6989586621679500032"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500032"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500032"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-154"></span><span>    </span><span id="local-6989586621679500030"><span class="annot"><a href="GHC.Float.html#expm1"><span class="hs-identifier hs-var hs-var">expm1</span></a></span><span> </span><span id="local-6989586621679500024"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500024"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500024"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span></span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621679500023"><span class="annot"><a href="GHC.Float.html#log1pexp"><span class="hs-identifier hs-var hs-var">log1pexp</span></a></span><span> </span><span id="local-6989586621679500020"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500020"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var">log1p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500020"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-156"></span><span>    </span><span id="local-6989586621679500019"><span class="annot"><a href="GHC.Float.html#log1mexp"><span class="hs-identifier hs-var hs-var">log1mexp</span></a></span><span> </span><span id="local-6989586621679500013"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500013"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var">log1p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679500013"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- | Default implementation for @'log1mexp'@ requiring @'Ord'@ to test</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- against a threshold to decide which implementation variant to use.</span><span>
</span><span id="line-160"></span><span id="local-6989586621679500285"><span class="annot"><a href="GHC.Float.html#log1mexpOrd"><span class="hs-identifier hs-type">log1mexpOrd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500285"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500285"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500285"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500285"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-161"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1mexpOrd"><span class="hs-pragma hs-type">log1mexpOrd</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-162"></span><span id="log1mexpOrd"><span class="annot"><span class="annottext">log1mexpOrd :: forall a. (Ord a, Floating a) =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1mexpOrd"><span class="hs-identifier hs-var hs-var">log1mexpOrd</span></a></span></span><span> </span><span id="local-6989586621679499997"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499997"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-163"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499997"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="hs-glyph">-</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#expm1"><span class="hs-identifier hs-var">expm1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499997"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var">log1p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499997"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-comment">-- | Efficient, machine-independent access to the components of a</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- floating-point number.</span><span>
</span><span id="line-168"></span><span class="hs-keyword">class</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Real.html#RealFrac"><span class="hs-identifier hs-type">RealFrac</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="RealFloat"><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-var">RealFloat</span></a></span></span><span> </span><span id="local-6989586621679500282"><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-169"></span><span>    </span><span class="hs-comment">-- | a constant function, returning the radix of the representation</span><span>
</span><span id="line-170"></span><span>    </span><span class="hs-comment">-- (often @2@)</span><span>
</span><span id="line-171"></span><span>    </span><span id="floatRadix"><span class="annot"><a href="GHC.Float.html#floatRadix"><span class="hs-identifier hs-type">floatRadix</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-172"></span><span>    </span><span class="hs-comment">-- | a constant function, returning the number of digits of</span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-comment">-- 'floatRadix' in the significand</span><span>
</span><span id="line-174"></span><span>    </span><span id="floatDigits"><span class="annot"><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-type">floatDigits</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-comment">-- | a constant function, returning the lowest and highest values</span><span>
</span><span id="line-176"></span><span>    </span><span class="hs-comment">-- the exponent may assume</span><span>
</span><span id="line-177"></span><span>    </span><span id="floatRange"><span class="annot"><a href="GHC.Float.html#floatRange"><span class="hs-identifier hs-type">floatRange</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>    </span><span class="hs-comment">-- | The function 'decodeFloat' applied to a real floating-point</span><span>
</span><span id="line-179"></span><span>    </span><span class="hs-comment">-- number returns the significand expressed as an 'Integer' and an</span><span>
</span><span id="line-180"></span><span>    </span><span class="hs-comment">-- appropriately scaled exponent (an 'Int').  If @'decodeFloat' x@</span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-comment">-- yields @(m,n)@, then @x@ is equal in value to @m*b^^n@, where @b@</span><span>
</span><span id="line-182"></span><span>    </span><span class="hs-comment">-- is the floating-point radix, and furthermore, either @m@ and @n@</span><span>
</span><span id="line-183"></span><span>    </span><span class="hs-comment">-- are both zero or else @b^(d-1) &lt;= 'abs' m &lt; b^d@, where @d@ is</span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-comment">-- the value of @'floatDigits' x@.</span><span>
</span><span id="line-185"></span><span>    </span><span class="hs-comment">-- In particular, @'decodeFloat' 0 = (0,0)@. If the type</span><span>
</span><span id="line-186"></span><span>    </span><span class="hs-comment">-- contains a negative zero, also @'decodeFloat' (-0.0) = (0,0)@.</span><span>
</span><span id="line-187"></span><span>    </span><span class="hs-comment">-- /The result of/ @'decodeFloat' x@ /is unspecified if either of/</span><span>
</span><span id="line-188"></span><span>    </span><span class="hs-comment">-- @'isNaN' x@ /or/ @'isInfinite' x@ /is/ 'True'.</span><span>
</span><span id="line-189"></span><span>    </span><span id="decodeFloat"><span class="annot"><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-type">decodeFloat</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>    </span><span class="hs-comment">-- | 'encodeFloat' performs the inverse of 'decodeFloat' in the</span><span>
</span><span id="line-191"></span><span>    </span><span class="hs-comment">-- sense that for finite @x@ with the exception of @-0.0@,</span><span>
</span><span id="line-192"></span><span>    </span><span class="hs-comment">-- @'Prelude.uncurry' 'encodeFloat' ('decodeFloat' x) = x@.</span><span>
</span><span id="line-193"></span><span>    </span><span class="hs-comment">-- @'encodeFloat' m n@ is one of the two closest representable</span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-comment">-- floating-point numbers to @m*b^^n@ (or @&amp;#177;Infinity@ if overflow</span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-comment">-- occurs); usually the closer, but if @m@ contains too many bits,</span><span>
</span><span id="line-196"></span><span>    </span><span class="hs-comment">-- the result may be rounded in the wrong direction.</span><span>
</span><span id="line-197"></span><span>    </span><span id="encodeFloat"><span class="annot"><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-type">encodeFloat</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-comment">-- | 'exponent' corresponds to the second component of 'decodeFloat'.</span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-comment">-- @'exponent' 0 = 0@ and for finite nonzero @x@,</span><span>
</span><span id="line-200"></span><span>    </span><span class="hs-comment">-- @'exponent' x = snd ('decodeFloat' x) + 'floatDigits' x@.</span><span>
</span><span id="line-201"></span><span>    </span><span class="hs-comment">-- If @x@ is a finite floating-point number, it is equal in value to</span><span>
</span><span id="line-202"></span><span>    </span><span class="hs-comment">-- @'significand' x * b ^^ 'exponent' x@, where @b@ is the</span><span>
</span><span id="line-203"></span><span>    </span><span class="hs-comment">-- floating-point radix.</span><span>
</span><span id="line-204"></span><span>    </span><span class="hs-comment">-- The behaviour is unspecified on infinite or @NaN@ values.</span><span>
</span><span id="line-205"></span><span>    </span><span id="exponent"><span class="annot"><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-type">exponent</span></a></span></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-206"></span><span>    </span><span class="hs-comment">-- | The first component of 'decodeFloat', scaled to lie in the open</span><span>
</span><span id="line-207"></span><span>    </span><span class="hs-comment">-- interval (@-1@,@1@), either @0.0@ or of absolute value @&gt;= 1\/b@,</span><span>
</span><span id="line-208"></span><span>    </span><span class="hs-comment">-- where @b@ is the floating-point radix.</span><span>
</span><span id="line-209"></span><span>    </span><span class="hs-comment">-- The behaviour is unspecified on infinite or @NaN@ values.</span><span>
</span><span id="line-210"></span><span>    </span><span id="significand"><span class="annot"><a href="GHC.Float.html#significand"><span class="hs-identifier hs-type">significand</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-211"></span><span>    </span><span class="hs-comment">-- | multiplies a floating-point number by an integer power of the radix</span><span>
</span><span id="line-212"></span><span>    </span><span id="scaleFloat"><span class="annot"><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-type">scaleFloat</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-213"></span><span>    </span><span class="hs-comment">-- | 'True' if the argument is an IEEE \&quot;not-a-number\&quot; (NaN) value</span><span>
</span><span id="line-214"></span><span>    </span><span id="isNaN"><span class="annot"><a href="GHC.Float.html#isNaN"><span class="hs-identifier hs-type">isNaN</span></a></span></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-215"></span><span>    </span><span class="hs-comment">-- | 'True' if the argument is an IEEE infinity or negative infinity</span><span>
</span><span id="line-216"></span><span>    </span><span id="isInfinite"><span class="annot"><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-type">isInfinite</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-217"></span><span>    </span><span class="hs-comment">-- | 'True' if the argument is too small to be represented in</span><span>
</span><span id="line-218"></span><span>    </span><span class="hs-comment">-- normalized format</span><span>
</span><span id="line-219"></span><span>    </span><span id="isDenormalized"><span class="annot"><a href="GHC.Float.html#isDenormalized"><span class="hs-identifier hs-type">isDenormalized</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-comment">-- | 'True' if the argument is an IEEE negative zero</span><span>
</span><span id="line-221"></span><span>    </span><span id="isNegativeZero"><span class="annot"><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-type">isNegativeZero</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-comment">-- | 'True' if the argument is an IEEE floating point number</span><span>
</span><span id="line-223"></span><span>    </span><span id="isIEEE"><span class="annot"><a href="GHC.Float.html#isIEEE"><span class="hs-identifier hs-type">isIEEE</span></a></span></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-224"></span><span>    </span><span class="hs-comment">-- | a version of arctangent taking two real floating-point arguments.</span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-comment">-- For real floating @x@ and @y@, @'atan2' y x@ computes the angle</span><span>
</span><span id="line-226"></span><span>    </span><span class="hs-comment">-- (from the positive x-axis) of the vector from the origin to the</span><span>
</span><span id="line-227"></span><span>    </span><span class="hs-comment">-- point @(x,y)@.  @'atan2' y x@ returns a value in the range [@-pi@,</span><span>
</span><span id="line-228"></span><span>    </span><span class="hs-comment">-- @pi@].  It follows the Common Lisp semantics for the origin when</span><span>
</span><span id="line-229"></span><span>    </span><span class="hs-comment">-- signed zeroes are supported.  @'atan2' y 1@, with @y@ in a type</span><span>
</span><span id="line-230"></span><span>    </span><span class="hs-comment">-- that is 'RealFloat', should return the same value as @'atan' y@.</span><span>
</span><span id="line-231"></span><span>    </span><span class="hs-comment">-- A default definition of 'atan2' is provided, but implementors</span><span>
</span><span id="line-232"></span><span>    </span><span class="hs-comment">-- can provide a more accurate implementation.</span><span>
</span><span id="line-233"></span><span>    </span><span id="atan2"><span class="annot"><a href="GHC.Float.html#atan2"><span class="hs-identifier hs-type">atan2</span></a></span></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500282"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span>    </span><span id="local-6989586621679499978"><span class="annot"><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-var hs-var">exponent</span></a></span><span> </span><span id="local-6989586621679499973"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499973"><span class="hs-identifier hs-var">x</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499972"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499971"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499973"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-237"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499972"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499972"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499971"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499971"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499973"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span>    </span><span id="local-6989586621679499969"><span class="annot"><a href="GHC.Float.html#significand"><span class="hs-identifier hs-var hs-var">significand</span></a></span><span> </span><span id="local-6989586621679499965"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499965"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499964"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499965"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-240"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499964"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499964"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499965"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span>    </span><span id="local-6989586621679499962"><span class="annot"><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679499948"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499948"><span class="hs-identifier hs-var">x</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499948"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-243"></span><span>    </span><span class="annot"><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span id="local-6989586621679499947"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499947"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679499946"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-244"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679499945"><span class="hs-identifier hs-var">isFix</span></a></span><span>           </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-245"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499944"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499943"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="GHC.Float.html#clamp"><span class="hs-identifier hs-var">clamp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499941"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499947"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499944"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499944"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499943"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499943"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-247"></span><span>                                 </span><span class="hs-special">(</span><span id="local-6989586621679499938"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499938"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499937"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499937"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int, Int)
forall a. RealFloat a =&gt; a -&gt; (Int, Int)
</span><a href="GHC.Float.html#floatRange"><span class="hs-identifier hs-var">floatRange</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-248"></span><span>                                 </span><span id="local-6989586621679499935"><span class="annot"><span class="annottext">d :: Int
</span><a href="#local-6989586621679499935"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-249"></span><span>                                 </span><span id="local-6989586621679499941"><span class="annot"><span class="annottext">b :: Int
</span><a href="#local-6989586621679499941"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499937"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499938"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499935"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-250"></span><span>                                 </span><span class="hs-comment">-- n+k may overflow, which would lead</span><span>
</span><span id="line-251"></span><span>                                 </span><span class="hs-comment">-- to wrong results, hence we clamp the</span><span>
</span><span id="line-252"></span><span>                                 </span><span class="hs-comment">-- scaling parameter.</span><span>
</span><span id="line-253"></span><span>                                 </span><span class="hs-comment">-- If n + k would be larger than h,</span><span>
</span><span id="line-254"></span><span>                                 </span><span class="hs-comment">-- n + clamp b k must be too, similar</span><span>
</span><span id="line-255"></span><span>                                 </span><span class="hs-comment">-- for smaller than l - d.</span><span>
</span><span id="line-256"></span><span>                                 </span><span class="hs-comment">-- Add a little extra to keep clear</span><span>
</span><span id="line-257"></span><span>                                 </span><span class="hs-comment">-- from the boundary cases.</span><span>
</span><span id="line-258"></span><span>                                 </span><span id="local-6989586621679499945"><span class="annot"><span class="annottext">isFix :: Bool
</span><a href="#local-6989586621679499945"><span class="hs-identifier hs-var hs-var">isFix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNaN"><span class="hs-identifier hs-var">isNaN</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499946"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span>    </span><span id="local-6989586621679499925"><span class="annot"><a href="GHC.Float.html#atan2"><span class="hs-identifier hs-var hs-var">atan2</span></a></span><span> </span><span id="local-6989586621679499874"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679499873"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-261"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>            </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#atan"><span class="hs-identifier hs-var">atan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-262"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
forall a. Floating a =&gt; a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var">pi</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span>
</span><span id="line-263"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
forall a. Floating a =&gt; a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var">pi</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#atan"><span class="hs-identifier hs-var">atan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>      </span><span class="hs-glyph">|</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>            </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-265"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-266"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. RealFloat a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#atan2"><span class="hs-identifier hs-var">atan2</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-268"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>                          </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
forall a. Floating a =&gt; a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var">pi</span></a></span><span>    </span><span class="hs-comment">-- must be after the previous test on zero y</span><span>
</span><span id="line-270"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span><span>     </span><span class="hs-comment">-- must be after the other double zero tests</span><span>
</span><span id="line-271"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499874"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-comment">-- x or y is a NaN, return a NaN (via +)</span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- Float</span><span>
</span><span id="line-275"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- Note that due to the presence of @NaN@, not all elements of 'Float' have an</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- additive inverse.</span><span>
</span><span id="line-280"></span><span class="hs-comment">--</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- &gt;&gt;&gt; 0/0 + (negate 0/0 :: Float)</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- NaN</span><span>
</span><span id="line-283"></span><span class="hs-comment">--</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- Also note that due to the presence of -0, `Float`'s 'Num' instance doesn't</span><span>
</span><span id="line-285"></span><span class="hs-comment">-- have an additive identity</span><span>
</span><span id="line-286"></span><span class="hs-comment">--</span><span>
</span><span id="line-287"></span><span class="hs-comment">-- &gt;&gt;&gt; 0 + (-0 :: Float)</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- 0.0</span><span>
</span><span id="line-289"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-290"></span><span>    </span><span id="local-6989586621679499861"><span class="annot"><span class="annottext">+ :: Float -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499861"><span class="hs-operator hs-var hs-var hs-var hs-var">(+)</span></a></span></span><span>         </span><span id="local-6989586621679499860"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499860"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499859"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499859"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#plusFloat"><span class="hs-identifier hs-var">plusFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499860"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499859"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-291"></span><span>    </span><span id="local-6989586621679499857"><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="hs-special">)</span></span><span>         </span><span id="local-6989586621679499856"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499856"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499855"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499855"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#minusFloat"><span class="hs-identifier hs-var">minusFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499856"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499855"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-292"></span><span>    </span><span id="local-6989586621679499853"><span class="annot"><span class="annottext">negate :: Float -&gt; Float
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var hs-var hs-var hs-var">negate</span></a></span></span><span>      </span><span id="local-6989586621679499852"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499852"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#negateFloat"><span class="hs-identifier hs-var">negateFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499852"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-293"></span><span>    </span><span id="local-6989586621679499850"><span class="annot"><span class="annottext">* :: Float -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499850"><span class="hs-operator hs-var hs-var hs-var hs-var">(*)</span></a></span></span><span>         </span><span id="local-6989586621679499849"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499849"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499848"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499848"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#timesFloat"><span class="hs-identifier hs-var">timesFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499849"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499848"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-294"></span><span>    </span><span id="local-6989586621679499846"><span class="annot"><span class="annottext">abs :: Float -&gt; Float
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var hs-var hs-var hs-var">abs</span></a></span></span><span>         </span><span id="local-6989586621679499844"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499844"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#fabsFloat"><span class="hs-identifier hs-var">fabsFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499844"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-295"></span><span>    </span><span id="local-6989586621679499837"><span class="annot"><span class="annottext">signum :: Float -&gt; Float
</span><a href="GHC.Num.html#signum"><span class="hs-identifier hs-var hs-var hs-var hs-var">signum</span></a></span></span><span> </span><span id="local-6989586621679499835"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499835"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499835"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span>
</span><span id="line-296"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499835"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#negateFloat"><span class="hs-identifier hs-var">negateFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span>
</span><span id="line-297"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499835"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-comment">-- handles 0.0, (-0.0), and NaN</span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.html#fromInteger"><span class="hs-pragma hs-type">fromInteger</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-300"></span><span>    </span><span id="local-6989586621679499834"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Float
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span id="local-6989586621679499833"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499833"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerToFloat%23"><span class="hs-identifier hs-var">integerToFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499833"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-303"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#Real"><span class="hs-identifier hs-type">Real</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-304"></span><span>    </span><span id="local-6989586621679499824"><span class="annot"><span class="annottext">toRational :: Float -&gt; Rational
</span><a href="GHC.Real.html#toRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">toRational</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679499823"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499823"><span class="hs-identifier hs-var">x#</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-305"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; (# Int#, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#decodeFloat_Int%23"><span class="hs-identifier hs-var">decodeFloat_Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499823"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-306"></span><span>          </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499822"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499822"><span class="hs-identifier hs-var">m#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499821"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499821"><span class="hs-identifier hs-var">e#</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-307"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499821"><span class="hs-identifier hs-var">e#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>                               </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-308"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IS"><span class="hs-identifier hs-var">IS</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499822"><span class="hs-identifier hs-var">m#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-operator hs-var">`integerShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499821"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-309"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499822"><span class="hs-identifier hs-var">m#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-310"></span><span>                    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; (# Integer, Int# #)
</span><a href="GHC.Float.ConversionUtils.html#elimZerosInt%23"><span class="hs-identifier hs-var">elimZerosInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499822"><span class="hs-identifier hs-var">m#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499821"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-311"></span><span>                      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499818"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499818"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499817"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499817"><span class="hs-identifier hs-var">d#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499818"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-identifier hs-var">integerShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499817"><span class="hs-identifier hs-var">d#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                         </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-313"></span><span>                    </span><span class="annot"><span class="annottext">Int# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IS"><span class="hs-identifier hs-var">IS</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499822"><span class="hs-identifier hs-var">m#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-identifier hs-var">integerShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499821"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- Note that due to the presence of @NaN@, not all elements of 'Float' have an</span><span>
</span><span id="line-317"></span><span class="hs-comment">-- multiplicative inverse.</span><span>
</span><span id="line-318"></span><span class="hs-comment">--</span><span>
</span><span id="line-319"></span><span class="hs-comment">-- &gt;&gt;&gt; 0/0 * (recip 0/0 :: Float)</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- NaN</span><span>
</span><span id="line-321"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-322"></span><span>    </span><span id="local-6989586621679499810"><span class="annot"><span class="annottext">/ :: Float -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499810"><span class="hs-operator hs-var hs-var hs-var hs-var">(/)</span></a></span></span><span> </span><span id="local-6989586621679499809"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499809"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499808"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499808"><span class="hs-identifier hs-var">y</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#divideFloat"><span class="hs-identifier hs-var">divideFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499809"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499808"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-323"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Real.html#fromRational"><span class="hs-pragma hs-type">fromRational</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-324"></span><span>    </span><span id="local-6989586621679499806"><span class="annot"><span class="annottext">fromRational :: Rational -&gt; Float
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromRational</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499805"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499805"><span class="hs-identifier hs-var">n</span></a></span></span><span class="annot"><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-type">:%</span></a></span><span id="local-6989586621679499804"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499804"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Float
</span><a href="GHC.Float.html#rationalToFloat"><span class="hs-identifier hs-var">rationalToFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499805"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499804"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-325"></span><span>    </span><span id="local-6989586621679499801"><span class="annot"><span class="annottext">recip :: Float -&gt; Float
</span><a href="GHC.Real.html#recip"><span class="hs-identifier hs-var hs-var hs-var hs-var">recip</span></a></span></span><span> </span><span id="local-6989586621679499799"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499799"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1.0</span></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499799"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Float.html#rationalToFloat"><span class="hs-identifier hs-type">rationalToFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-328"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Float.html#rationalToFloat"><span class="hs-pragma hs-type">rationalToFloat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-329"></span><span id="rationalToFloat"><span class="annot"><span class="annottext">rationalToFloat :: Integer -&gt; Integer -&gt; Float
</span><a href="GHC.Float.html#rationalToFloat"><span class="hs-identifier hs-var hs-var">rationalToFloat</span></a></span></span><span> </span><span id="local-6989586621679499798"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499798"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>
</span><span id="line-330"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499798"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span>
</span><span id="line-331"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499798"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span>
</span><span id="line-332"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Float.html#rationalToFloat"><span class="hs-identifier hs-var">rationalToFloat</span></a></span><span> </span><span id="local-6989586621679499797"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499797"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679499796"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499796"><span class="hs-identifier hs-var">d</span></a></span></span><span>
</span><span id="line-334"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499797"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Float
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-335"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499797"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; Float
forall a. RealFloat a =&gt; Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; a
</span><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-var">fromRat''</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499794"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499793"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499797"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499796"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; Float
forall a. RealFloat a =&gt; Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; a
</span><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-var">fromRat''</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499794"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499793"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499797"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499796"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-337"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-338"></span><span>        </span><span id="local-6989586621679499794"><span class="annot"><span class="annottext">minEx :: Int
</span><a href="#local-6989586621679499794"><span class="hs-identifier hs-var hs-var">minEx</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">FLT_MIN_EXP</span><span>
</span><span id="line-339"></span><span>        </span><span id="local-6989586621679499793"><span class="annot"><span class="annottext">mantDigs :: Int
</span><a href="#local-6989586621679499793"><span class="hs-identifier hs-var hs-var">mantDigs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">FLT_MANT_DIG</span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span class="hs-comment">-- RULES for Integer and Int</span><span>
</span><span id="line-342"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-343"></span><span class="annot"><span class="hs-pragma">&quot;properFraction/Float-&gt;Integer&quot;</span></span><span>     </span><span class="annot"><a href="GHC.Real.html#properFraction"><span class="hs-pragma hs-type">properFraction</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#properFractionFloatInteger"><span class="hs-pragma hs-type">properFractionFloatInteger</span></a></span><span>
</span><span id="line-344"></span><span class="annot"><span class="hs-pragma">&quot;truncate/Float-&gt;Integer&quot;</span></span><span>           </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#truncateFloatInteger"><span class="hs-pragma hs-type">truncateFloatInteger</span></a></span><span>
</span><span id="line-345"></span><span class="annot"><span class="hs-pragma">&quot;floor/Float-&gt;Integer&quot;</span></span><span>              </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#floorFloatInteger"><span class="hs-pragma hs-type">floorFloatInteger</span></a></span><span>
</span><span id="line-346"></span><span class="annot"><span class="hs-pragma">&quot;ceiling/Float-&gt;Integer&quot;</span></span><span>            </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#ceilingFloatInteger"><span class="hs-pragma hs-type">ceilingFloatInteger</span></a></span><span>
</span><span id="line-347"></span><span class="annot"><span class="hs-pragma">&quot;round/Float-&gt;Integer&quot;</span></span><span>              </span><span class="annot"><a href="GHC.Real.html#round"><span class="hs-pragma hs-type">round</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#roundFloatInteger"><span class="hs-pragma hs-type">roundFloatInteger</span></a></span><span>
</span><span id="line-348"></span><span class="annot"><span class="hs-pragma">&quot;properFraction/Float-&gt;Int&quot;</span></span><span>         </span><span class="annot"><a href="GHC.Real.html#properFraction"><span class="hs-pragma hs-type">properFraction</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#properFractionFloatInt"><span class="hs-pragma hs-type">properFractionFloatInt</span></a></span><span>
</span><span id="line-349"></span><span class="annot"><span class="hs-pragma">&quot;truncate/Float-&gt;Int&quot;</span></span><span>               </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#float2Int"><span class="hs-pragma hs-type">float2Int</span></a></span><span>
</span><span id="line-350"></span><span class="annot"><span class="hs-pragma">&quot;floor/Float-&gt;Int&quot;</span></span><span>                  </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#floorFloatInt"><span class="hs-pragma hs-type">floorFloatInt</span></a></span><span>
</span><span id="line-351"></span><span class="annot"><span class="hs-pragma">&quot;ceiling/Float-&gt;Int&quot;</span></span><span>                </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#ceilingFloatInt"><span class="hs-pragma hs-type">ceilingFloatInt</span></a></span><span>
</span><span id="line-352"></span><span class="annot"><span class="hs-pragma">&quot;round/Float-&gt;Int&quot;</span></span><span>                  </span><span class="annot"><a href="GHC.Real.html#round"><span class="hs-pragma hs-type">round</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#roundFloatInt"><span class="hs-pragma hs-type">roundFloatInt</span></a></span><span>
</span><span id="line-353"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-354"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-355"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#RealFrac"><span class="hs-identifier hs-type">RealFrac</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-356"></span><span>
</span><span id="line-357"></span><span>        </span><span class="hs-comment">-- ceiling, floor, and truncate are all small</span><span>
</span><span id="line-358"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-359"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-360"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span class="hs-comment">-- We assume that FLT_RADIX is 2 so that we can use more efficient code</span><span class="hs-cpp">
#if FLT_RADIX != 2
</span><span class="hs-cpp">#error FLT_RADIX must be 2
</span><span class="hs-cpp">#endif
</span><span>    </span><span id="local-6989586621679499747"><span class="annot"><span class="annottext">properFraction :: forall b. Integral b =&gt; Float -&gt; (b, Float)
</span><a href="#local-6989586621679499747"><span class="hs-identifier hs-var hs-var hs-var hs-var">properFraction</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679499746"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499746"><span class="hs-identifier hs-var">x#</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-367"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; (# Int#, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#decodeFloat_Int%23"><span class="hs-identifier hs-var">decodeFloat_Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499746"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-368"></span><span>        </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499745"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499745"><span class="hs-identifier hs-var">m#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499744"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499744"><span class="hs-identifier hs-var">n#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-369"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679499743"><span class="annot"><span class="annottext">m :: Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499745"><span class="hs-identifier hs-var">m#</span></a></span><span>
</span><span id="line-370"></span><span>                </span><span id="local-6989586621679499742"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499744"><span class="hs-identifier hs-var">n#</span></a></span><span>
</span><span id="line-371"></span><span>            </span><span class="hs-keyword">in</span><span>
</span><span id="line-372"></span><span>            </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-373"></span><span>            </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">b -&gt; Int -&gt; b
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.0</span></span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>            </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679499731"><span class="annot"><span class="annottext">i :: Int
</span><a href="#local-6989586621679499731"><span class="hs-identifier hs-var hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>                </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-375"></span><span>                                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-376"></span><span>                     </span><span id="local-6989586621679499726"><span class="annot"><span class="annottext">f :: Int
</span><a href="#local-6989586621679499726"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499743"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499731"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span>                 </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499731"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Float
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499726"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499742"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span>    </span><span id="local-6989586621679499721"><span class="annot"><span class="annottext">truncate :: forall b. Integral b =&gt; Float -&gt; b
</span><a href="#local-6989586621679499721"><span class="hs-identifier hs-var hs-var hs-var hs-var">truncate</span></a></span></span><span> </span><span id="local-6989586621679499720"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499720"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (b, Float)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499720"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-380"></span><span>                     </span><span class="hs-special">(</span><span id="local-6989586621679499719"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499719"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499719"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span>    </span><span id="local-6989586621679499710"><span class="annot"><span class="annottext">round :: forall b. Integral b =&gt; Float -&gt; b
</span><a href="#local-6989586621679499710"><span class="hs-identifier hs-var hs-var hs-var hs-var">round</span></a></span></span><span> </span><span id="local-6989586621679499709"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499709"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (b, Float)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499709"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-383"></span><span>                     </span><span class="hs-special">(</span><span id="local-6989586621679499708"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499707"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499707"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-384"></span><span>                                </span><span id="local-6989586621679499700"><span class="annot"><span class="annottext">m :: b
</span><a href="#local-6989586621679499700"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499707"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span>
</span><span id="line-385"></span><span>                                </span><span id="local-6989586621679499696"><span class="annot"><span class="annottext">half_down :: Float
</span><a href="#local-6989586621679499696"><span class="hs-identifier hs-var hs-var">half_down</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499707"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.5</span></span><span>
</span><span id="line-386"></span><span>                              </span><span class="hs-keyword">in</span><span>
</span><span id="line-387"></span><span>                              </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499696"><span class="hs-identifier hs-var">half_down</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.0</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-388"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-389"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">b -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.Real.html#even"><span class="hs-identifier hs-var">even</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499708"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499700"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-390"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499700"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span>    </span><span id="local-6989586621679499684"><span class="annot"><span class="annottext">ceiling :: forall b. Integral b =&gt; Float -&gt; b
</span><a href="#local-6989586621679499684"><span class="hs-identifier hs-var hs-var hs-var hs-var">ceiling</span></a></span></span><span> </span><span id="local-6989586621679499683"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499683"><span class="hs-identifier hs-var">x</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (b, Float)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499683"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-393"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679499682"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499682"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499681"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499681"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499681"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499682"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499682"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span>    </span><span id="local-6989586621679499671"><span class="annot"><span class="annottext">floor :: forall b. Integral b =&gt; Float -&gt; b
</span><a href="#local-6989586621679499671"><span class="hs-identifier hs-var hs-var hs-var hs-var">floor</span></a></span></span><span> </span><span id="local-6989586621679499670"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499670"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (b, Float)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499670"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-396"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679499669"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499669"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499668"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499668"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499668"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499669"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499669"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-399"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-400"></span><span>    </span><span id="local-6989586621679499641"><span class="annot"><span class="annottext">pi :: Float
</span><a href="#local-6989586621679499641"><span class="hs-identifier hs-var hs-var hs-var hs-var">pi</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">3.141592653589793238</span></span><span>
</span><span id="line-401"></span><span>    </span><span id="local-6989586621679499640"><span class="annot"><span class="annottext">exp :: Float -&gt; Float
</span><a href="#local-6989586621679499640"><span class="hs-identifier hs-var hs-var hs-var hs-var">exp</span></a></span></span><span> </span><span id="local-6989586621679499639"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499639"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#expFloat"><span class="hs-identifier hs-var">expFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499639"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-402"></span><span>    </span><span id="local-6989586621679499637"><span class="annot"><span class="annottext">log :: Float -&gt; Float
</span><a href="#local-6989586621679499637"><span class="hs-identifier hs-var hs-var hs-var hs-var">log</span></a></span></span><span> </span><span id="local-6989586621679499636"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499636"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#logFloat"><span class="hs-identifier hs-var">logFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499636"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-403"></span><span>    </span><span id="local-6989586621679499634"><span class="annot"><span class="annottext">sqrt :: Float -&gt; Float
</span><a href="#local-6989586621679499634"><span class="hs-identifier hs-var hs-var hs-var hs-var">sqrt</span></a></span></span><span> </span><span id="local-6989586621679499633"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499633"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#sqrtFloat"><span class="hs-identifier hs-var">sqrtFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499633"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-404"></span><span>    </span><span id="local-6989586621679499631"><span class="annot"><span class="annottext">sin :: Float -&gt; Float
</span><a href="#local-6989586621679499631"><span class="hs-identifier hs-var hs-var hs-var hs-var">sin</span></a></span></span><span> </span><span id="local-6989586621679499630"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499630"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#sinFloat"><span class="hs-identifier hs-var">sinFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499630"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-405"></span><span>    </span><span id="local-6989586621679499628"><span class="annot"><span class="annottext">cos :: Float -&gt; Float
</span><a href="#local-6989586621679499628"><span class="hs-identifier hs-var hs-var hs-var hs-var">cos</span></a></span></span><span> </span><span id="local-6989586621679499627"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499627"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#cosFloat"><span class="hs-identifier hs-var">cosFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499627"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-406"></span><span>    </span><span id="local-6989586621679499625"><span class="annot"><span class="annottext">tan :: Float -&gt; Float
</span><a href="#local-6989586621679499625"><span class="hs-identifier hs-var hs-var hs-var hs-var">tan</span></a></span></span><span> </span><span id="local-6989586621679499624"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499624"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#tanFloat"><span class="hs-identifier hs-var">tanFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499624"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-407"></span><span>    </span><span id="local-6989586621679499622"><span class="annot"><span class="annottext">asin :: Float -&gt; Float
</span><a href="#local-6989586621679499622"><span class="hs-identifier hs-var hs-var hs-var hs-var">asin</span></a></span></span><span> </span><span id="local-6989586621679499621"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499621"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#asinFloat"><span class="hs-identifier hs-var">asinFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499621"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-408"></span><span>    </span><span id="local-6989586621679499619"><span class="annot"><span class="annottext">acos :: Float -&gt; Float
</span><a href="#local-6989586621679499619"><span class="hs-identifier hs-var hs-var hs-var hs-var">acos</span></a></span></span><span> </span><span id="local-6989586621679499618"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499618"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#acosFloat"><span class="hs-identifier hs-var">acosFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499618"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-409"></span><span>    </span><span id="local-6989586621679499616"><span class="annot"><span class="annottext">atan :: Float -&gt; Float
</span><a href="#local-6989586621679499616"><span class="hs-identifier hs-var hs-var hs-var hs-var">atan</span></a></span></span><span> </span><span id="local-6989586621679499615"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499615"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#atanFloat"><span class="hs-identifier hs-var">atanFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499615"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-410"></span><span>    </span><span id="local-6989586621679499613"><span class="annot"><span class="annottext">sinh :: Float -&gt; Float
</span><a href="#local-6989586621679499613"><span class="hs-identifier hs-var hs-var hs-var hs-var">sinh</span></a></span></span><span> </span><span id="local-6989586621679499612"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499612"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#sinhFloat"><span class="hs-identifier hs-var">sinhFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499612"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-411"></span><span>    </span><span id="local-6989586621679499610"><span class="annot"><span class="annottext">cosh :: Float -&gt; Float
</span><a href="#local-6989586621679499610"><span class="hs-identifier hs-var hs-var hs-var hs-var">cosh</span></a></span></span><span> </span><span id="local-6989586621679499609"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499609"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#coshFloat"><span class="hs-identifier hs-var">coshFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499609"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-412"></span><span>    </span><span id="local-6989586621679499607"><span class="annot"><span class="annottext">tanh :: Float -&gt; Float
</span><a href="#local-6989586621679499607"><span class="hs-identifier hs-var hs-var hs-var hs-var">tanh</span></a></span></span><span> </span><span id="local-6989586621679499606"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499606"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#tanhFloat"><span class="hs-identifier hs-var">tanhFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499606"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-413"></span><span>    </span><span id="local-6989586621679499604"><span class="annot"><span class="annottext">** :: Float -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499604"><span class="hs-operator hs-var hs-var hs-var hs-var">(**)</span></a></span></span><span> </span><span id="local-6989586621679499603"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499603"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499602"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499602"><span class="hs-identifier hs-var">y</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#powerFloat"><span class="hs-identifier hs-var">powerFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499603"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499602"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-414"></span><span>    </span><span id="local-6989586621679499597"><span class="annot"><span class="annottext">logBase :: Float -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499597"><span class="hs-identifier hs-var hs-var hs-var hs-var">logBase</span></a></span></span><span> </span><span id="local-6989586621679499596"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499596"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499595"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499595"><span class="hs-identifier hs-var">y</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499595"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499596"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span>    </span><span id="local-6989586621679499594"><span class="annot"><span class="annottext">asinh :: Float -&gt; Float
</span><a href="#local-6989586621679499594"><span class="hs-identifier hs-var hs-var hs-var hs-var">asinh</span></a></span></span><span> </span><span id="local-6989586621679499593"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499593"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#asinhFloat"><span class="hs-identifier hs-var">asinhFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499593"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-417"></span><span>    </span><span id="local-6989586621679499591"><span class="annot"><span class="annottext">acosh :: Float -&gt; Float
</span><a href="#local-6989586621679499591"><span class="hs-identifier hs-var hs-var hs-var hs-var">acosh</span></a></span></span><span> </span><span id="local-6989586621679499590"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499590"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#acoshFloat"><span class="hs-identifier hs-var">acoshFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499590"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-418"></span><span>    </span><span id="local-6989586621679499588"><span class="annot"><span class="annottext">atanh :: Float -&gt; Float
</span><a href="#local-6989586621679499588"><span class="hs-identifier hs-var hs-var hs-var hs-var">atanh</span></a></span></span><span> </span><span id="local-6989586621679499587"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499587"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#atanhFloat"><span class="hs-identifier hs-var">atanhFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499587"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-419"></span><span>
</span><span id="line-420"></span><span>    </span><span id="local-6989586621679499585"><span class="annot"><span class="annottext">log1p :: Float -&gt; Float
</span><a href="#local-6989586621679499585"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#log1pFloat"><span class="hs-identifier hs-var">log1pFloat</span></a></span><span>
</span><span id="line-421"></span><span>    </span><span id="local-6989586621679499583"><span class="annot"><span class="annottext">expm1 :: Float -&gt; Float
</span><a href="#local-6989586621679499583"><span class="hs-identifier hs-var hs-var hs-var hs-var">expm1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#expm1Float"><span class="hs-identifier hs-var">expm1Float</span></a></span><span>
</span><span id="line-422"></span><span>
</span><span id="line-423"></span><span>    </span><span id="local-6989586621679499579"><span class="annot"><span class="annottext">log1mexp :: Float -&gt; Float
</span><a href="#local-6989586621679499579"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1mexp</span></a></span></span><span> </span><span id="local-6989586621679499578"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499578"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. (Ord a, Floating a) =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1mexpOrd"><span class="hs-identifier hs-var">log1mexpOrd</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499578"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-424"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1mexp"><span class="hs-pragma hs-type">log1mexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-425"></span><span>    </span><span id="local-6989586621679499569"><span class="annot"><span class="annottext">log1pexp :: Float -&gt; Float
</span><a href="#local-6989586621679499569"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1pexp</span></a></span></span><span> </span><span id="local-6989586621679499568"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-426"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">18</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
</span><a href="GHC.Float.html#log1pFloat"><span class="hs-identifier hs-var">log1pFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">100</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-428"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499568"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-429"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1pexp"><span class="hs-pragma hs-type">log1pexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-432"></span><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679499549"><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-433"></span><span>    </span><span id="local-6989586621679499547"><span class="annot"><span class="annottext">floatRadix :: Float -&gt; Integer
</span><a href="#local-6989586621679499547"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatRadix</span></a></span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">FLT_RADIX</span><span>        </span><span class="hs-comment">-- from float.h</span><span>
</span><span id="line-434"></span><span>    </span><span id="local-6989586621679499546"><span class="annot"><span class="annottext">floatDigits :: Float -&gt; Int
</span><a href="#local-6989586621679499546"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatDigits</span></a></span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">FLT_MANT_DIG</span><span>     </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-435"></span><span>    </span><span id="local-6989586621679499543"><span class="annot"><span class="annottext">floatRange :: Float -&gt; (Int, Int)
</span><a href="#local-6989586621679499543"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatRange</span></a></span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="hs-identifier">FLT_MIN_EXP</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">FLT_MAX_EXP</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-436"></span><span>
</span><span id="line-437"></span><span>    </span><span id="local-6989586621679499542"><span class="annot"><span class="annottext">decodeFloat :: Float -&gt; (Integer, Int)
</span><a href="#local-6989586621679499542"><span class="hs-identifier hs-var hs-var hs-var hs-var">decodeFloat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679499541"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499541"><span class="hs-identifier hs-var">f#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; (# Int#, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#decodeFloat_Int%23"><span class="hs-identifier hs-var">decodeFloat_Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679499541"><span class="hs-identifier hs-var">f#</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-438"></span><span>                          </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499540"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499540"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499539"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499539"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IS"><span class="hs-identifier hs-var">IS</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499540"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499539"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span>    </span><span id="local-6989586621679499538"><span class="annot"><span class="annottext">encodeFloat :: Integer -&gt; Int -&gt; Float
</span><a href="#local-6989586621679499538"><span class="hs-identifier hs-var hs-var hs-var hs-var">encodeFloat</span></a></span></span><span> </span><span id="local-6989586621679499537"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499537"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679499536"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499536"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; Float#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerEncodeFloat%23"><span class="hs-identifier hs-var">integerEncodeFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499537"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499536"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span>    </span><span id="local-6989586621679499530"><span class="annot"><span class="annottext">exponent :: Float -&gt; Int
</span><a href="#local-6989586621679499530"><span class="hs-identifier hs-var hs-var hs-var hs-var">exponent</span></a></span></span><span> </span><span id="local-6989586621679499529"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499529"><span class="hs-identifier hs-var">x</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499529"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-443"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499528"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499528"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499527"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499527"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499528"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499527"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499529"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-444"></span><span>
</span><span id="line-445"></span><span>    </span><span id="local-6989586621679499522"><span class="annot"><span class="annottext">significand :: Float -&gt; Float
</span><a href="#local-6989586621679499522"><span class="hs-identifier hs-var hs-var hs-var hs-var">significand</span></a></span></span><span> </span><span id="local-6989586621679499521"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499521"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499521"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-446"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499520"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499520"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Float
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499520"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499521"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-447"></span><span>
</span><span id="line-448"></span><span>    </span><span id="local-6989586621679499514"><span class="annot"><span class="annottext">scaleFloat :: Int -&gt; Float -&gt; Float
</span><a href="#local-6989586621679499514"><span class="hs-identifier hs-var hs-var hs-var hs-var">scaleFloat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679499513"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499513"><span class="hs-identifier hs-var">x</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499513"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-449"></span><span>    </span><span class="annot"><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span id="local-6989586621679499512"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499512"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679499511"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499511"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-450"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679499510"><span class="hs-identifier hs-var">isFix</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499511"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-451"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Float -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499511"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-452"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499509"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499509"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499508"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499508"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Float
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499509"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499508"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="GHC.Float.html#clamp"><span class="hs-identifier hs-var">clamp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499507"><span class="hs-identifier hs-var">bf</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499512"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-453"></span><span>                        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679499507"><span class="annot"><span class="annottext">bf :: Int
</span><a href="#local-6989586621679499507"><span class="hs-identifier hs-var hs-var">bf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">FLT_MAX_EXP</span><span> </span><span class="hs-glyph">-</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">FLT_MIN_EXP</span><span class="hs-special">)</span><span> </span><span class="hs-operator">+</span><span> </span><span class="hs-number">4</span><span class="hs-operator">*</span><span class="hs-identifier">FLT_MANT_DIG</span><span>
</span><span id="line-454"></span><span>                              </span><span id="local-6989586621679499510"><span class="annot"><span class="annottext">isFix :: Bool
</span><a href="#local-6989586621679499510"><span class="hs-identifier hs-var hs-var">isFix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499511"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
</span><a href="GHC.Float.html#isFloatFinite"><span class="hs-identifier hs-var">isFloatFinite</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499511"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-455"></span><span>
</span><span id="line-456"></span><span>    </span><span id="local-6989586621679499490"><span class="annot"><span class="annottext">isNaN :: Float -&gt; Bool
</span><a href="#local-6989586621679499490"><span class="hs-identifier hs-var hs-var hs-var hs-var">isNaN</span></a></span></span><span> </span><span id="local-6989586621679499489"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499489"><span class="hs-identifier hs-var">x</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
</span><a href="GHC.Float.html#isFloatNaN"><span class="hs-identifier hs-var">isFloatNaN</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499489"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-457"></span><span>    </span><span id="local-6989586621679499484"><span class="annot"><span class="annottext">isInfinite :: Float -&gt; Bool
</span><a href="#local-6989586621679499484"><span class="hs-identifier hs-var hs-var hs-var hs-var">isInfinite</span></a></span></span><span> </span><span id="local-6989586621679499483"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499483"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
</span><a href="GHC.Float.html#isFloatInfinite"><span class="hs-identifier hs-var">isFloatInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499483"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-458"></span><span>    </span><span id="local-6989586621679499479"><span class="annot"><span class="annottext">isDenormalized :: Float -&gt; Bool
</span><a href="#local-6989586621679499479"><span class="hs-identifier hs-var hs-var hs-var hs-var">isDenormalized</span></a></span></span><span> </span><span id="local-6989586621679499478"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499478"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
</span><a href="GHC.Float.html#isFloatDenormalized"><span class="hs-identifier hs-var">isFloatDenormalized</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499478"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-459"></span><span>    </span><span id="local-6989586621679499474"><span class="annot"><span class="annottext">isNegativeZero :: Float -&gt; Bool
</span><a href="#local-6989586621679499474"><span class="hs-identifier hs-var hs-var hs-var hs-var">isNegativeZero</span></a></span></span><span> </span><span id="local-6989586621679499473"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499473"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
</span><a href="GHC.Float.html#isFloatNegativeZero"><span class="hs-identifier hs-var">isFloatNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499473"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-460"></span><span>    </span><span id="local-6989586621679499471"><span class="annot"><span class="annottext">isIEEE :: Float -&gt; Bool
</span><a href="#local-6989586621679499471"><span class="hs-identifier hs-var hs-var hs-var hs-var">isIEEE</span></a></span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-461"></span><span>
</span><span id="line-462"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-463"></span><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679499468"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-464"></span><span>    </span><span id="local-6989586621679499463"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Float -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span>   </span><span id="local-6989586621679499461"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499461"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Float -&gt; ShowS) -&gt; Int -&gt; Float -&gt; ShowS
forall a. RealFloat a =&gt; (a -&gt; ShowS) -&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showSignedFloat"><span class="hs-identifier hs-var">showSignedFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; ShowS
forall a. RealFloat a =&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showFloat"><span class="hs-identifier hs-var">showFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499461"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-465"></span><span>    </span><span id="local-6989586621679499457"><span class="annot"><span class="annottext">showList :: [Float] -&gt; ShowS
</span><a href="GHC.Show.html#showList"><span class="hs-identifier hs-var hs-var hs-var hs-var">showList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Float -&gt; ShowS) -&gt; [Float] -&gt; ShowS
forall a. (a -&gt; ShowS) -&gt; [a] -&gt; ShowS
</span><a href="GHC.Show.html#showList__"><span class="hs-identifier hs-var">showList__</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Float -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-468"></span><span class="hs-comment">-- Double</span><span>
</span><span id="line-469"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-472"></span><span class="hs-comment">-- Note that due to the presence of @NaN@, not all elements of 'Double' have an</span><span>
</span><span id="line-473"></span><span class="hs-comment">-- additive inverse.</span><span>
</span><span id="line-474"></span><span class="hs-comment">--</span><span>
</span><span id="line-475"></span><span class="hs-comment">-- &gt;&gt;&gt; 0/0 + (negate 0/0 :: Double)</span><span>
</span><span id="line-476"></span><span class="hs-comment">-- NaN</span><span>
</span><span id="line-477"></span><span class="hs-comment">--</span><span>
</span><span id="line-478"></span><span class="hs-comment">-- Also note that due to the presence of -0, `Double`'s 'Num' instance doesn't</span><span>
</span><span id="line-479"></span><span class="hs-comment">-- have an additive identity</span><span>
</span><span id="line-480"></span><span class="hs-comment">--</span><span>
</span><span id="line-481"></span><span class="hs-comment">-- &gt;&gt;&gt; 0 + (-0 :: Double)</span><span>
</span><span id="line-482"></span><span class="hs-comment">-- 0.0</span><span>
</span><span id="line-483"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-484"></span><span>    </span><span id="local-6989586621679499447"><span class="annot"><span class="annottext">+ :: Double -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499447"><span class="hs-operator hs-var hs-var hs-var hs-var">(+)</span></a></span></span><span>         </span><span id="local-6989586621679499446"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499446"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499445"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499445"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#plusDouble"><span class="hs-identifier hs-var">plusDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499446"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499445"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-485"></span><span>    </span><span id="local-6989586621679499443"><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="hs-special">)</span></span><span>         </span><span id="local-6989586621679499442"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499442"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499441"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499441"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#minusDouble"><span class="hs-identifier hs-var">minusDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499442"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499441"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-486"></span><span>    </span><span id="local-6989586621679499439"><span class="annot"><span class="annottext">negate :: Double -&gt; Double
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var hs-var hs-var hs-var">negate</span></a></span></span><span>      </span><span id="local-6989586621679499438"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499438"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#negateDouble"><span class="hs-identifier hs-var">negateDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499438"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-487"></span><span>    </span><span id="local-6989586621679499436"><span class="annot"><span class="annottext">* :: Double -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499436"><span class="hs-operator hs-var hs-var hs-var hs-var">(*)</span></a></span></span><span>         </span><span id="local-6989586621679499435"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499435"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499434"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499434"><span class="hs-identifier hs-var">y</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#timesDouble"><span class="hs-identifier hs-var">timesDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499435"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499434"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-488"></span><span>    </span><span id="local-6989586621679499432"><span class="annot"><span class="annottext">abs :: Double -&gt; Double
</span><a href="#local-6989586621679499432"><span class="hs-identifier hs-var hs-var hs-var hs-var">abs</span></a></span></span><span>         </span><span id="local-6989586621679499431"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499431"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#fabsDouble"><span class="hs-identifier hs-var">fabsDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499431"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-489"></span><span>    </span><span id="local-6989586621679499424"><span class="annot"><span class="annottext">signum :: Double -&gt; Double
</span><a href="#local-6989586621679499424"><span class="hs-identifier hs-var hs-var hs-var hs-var">signum</span></a></span></span><span> </span><span id="local-6989586621679499423"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499423"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499423"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span>
</span><span id="line-490"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499423"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#negateDouble"><span class="hs-identifier hs-var">negateDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span>
</span><span id="line-491"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499423"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-comment">-- handles 0.0, (-0.0), and NaN</span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.html#fromInteger"><span class="hs-pragma hs-type">fromInteger</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-495"></span><span>    </span><span id="local-6989586621679499422"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Double
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span id="local-6989586621679499421"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499421"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Double#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerToDouble%23"><span class="hs-identifier hs-var">integerToDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499421"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-499"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#Real"><span class="hs-identifier hs-type">Real</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-500"></span><span>    </span><span id="local-6989586621679499413"><span class="annot"><span class="annottext">toRational :: Double -&gt; Rational
</span><a href="GHC.Real.html#toRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">toRational</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679499412"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679499412"><span class="hs-identifier hs-var">x#</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-501"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; (# Integer, Int# #)
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerDecodeDouble%23"><span class="hs-identifier hs-var">integerDecodeDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679499412"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-502"></span><span>          </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499410"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499410"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499409"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499409"><span class="hs-identifier hs-var">e#</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-503"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499409"><span class="hs-identifier hs-var">e#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>                                  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-504"></span><span>                </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-identifier hs-var">integerShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499410"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499409"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-505"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerToWord%23"><span class="hs-identifier hs-var">integerToWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499410"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-506"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; (# Integer, Int# #)
</span><a href="GHC.Float.ConversionUtils.html#elimZerosInteger"><span class="hs-identifier hs-var">elimZerosInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499410"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499409"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-507"></span><span>                    </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499407"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499407"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499406"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499406"><span class="hs-identifier hs-var">d#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499407"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-identifier hs-var">integerShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499406"><span class="hs-identifier hs-var">d#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-508"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                            </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-509"></span><span>                </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499410"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Word# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerShiftL%23"><span class="hs-identifier hs-var">integerShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499409"><span class="hs-identifier hs-var">e#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-510"></span><span>
</span><span id="line-511"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-512"></span><span class="hs-comment">-- Note that due to the presence of @NaN@, not all elements of 'Double' have an</span><span>
</span><span id="line-513"></span><span class="hs-comment">-- multiplicative inverse.</span><span>
</span><span id="line-514"></span><span class="hs-comment">--</span><span>
</span><span id="line-515"></span><span class="hs-comment">-- &gt;&gt;&gt; 0/0 * (recip 0/0 :: Double)</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- NaN</span><span>
</span><span id="line-517"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-518"></span><span>    </span><span id="local-6989586621679499400"><span class="annot"><span class="annottext">/ :: Double -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499400"><span class="hs-operator hs-var hs-var hs-var hs-var">(/)</span></a></span></span><span> </span><span id="local-6989586621679499399"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499399"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499398"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499398"><span class="hs-identifier hs-var">y</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#divideDouble"><span class="hs-identifier hs-var">divideDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499399"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499398"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-519"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Real.html#fromRational"><span class="hs-pragma hs-type">fromRational</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-520"></span><span>    </span><span id="local-6989586621679499396"><span class="annot"><span class="annottext">fromRational :: Rational -&gt; Double
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromRational</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499395"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499395"><span class="hs-identifier hs-var">n</span></a></span></span><span class="annot"><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-type">:%</span></a></span><span id="local-6989586621679499394"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499394"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Double
</span><a href="GHC.Float.html#rationalToDouble"><span class="hs-identifier hs-var">rationalToDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499395"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499394"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-521"></span><span>    </span><span id="local-6989586621679499391"><span class="annot"><span class="annottext">recip :: Double -&gt; Double
</span><a href="#local-6989586621679499391"><span class="hs-identifier hs-var hs-var hs-var hs-var">recip</span></a></span></span><span> </span><span id="local-6989586621679499390"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499390"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1.0</span></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499390"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-522"></span><span>
</span><span id="line-523"></span><span class="annot"><a href="GHC.Float.html#rationalToDouble"><span class="hs-identifier hs-type">rationalToDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-524"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Float.html#rationalToDouble"><span class="hs-pragma hs-type">rationalToDouble</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-525"></span><span id="rationalToDouble"><span class="annot"><span class="annottext">rationalToDouble :: Integer -&gt; Integer -&gt; Double
</span><a href="GHC.Float.html#rationalToDouble"><span class="hs-identifier hs-var hs-var">rationalToDouble</span></a></span></span><span> </span><span id="local-6989586621679499389"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499389"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>
</span><span id="line-526"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499389"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span>
</span><span id="line-527"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499389"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span>
</span><span id="line-528"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span>
</span><span id="line-529"></span><span class="annot"><a href="GHC.Float.html#rationalToDouble"><span class="hs-identifier hs-var">rationalToDouble</span></a></span><span> </span><span id="local-6989586621679499388"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499388"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679499387"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499387"><span class="hs-identifier hs-var">d</span></a></span></span><span>
</span><span id="line-530"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499388"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Double
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-531"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499388"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; Double
forall a. RealFloat a =&gt; Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; a
</span><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-var">fromRat''</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499386"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499385"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499388"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499387"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; Double
forall a. RealFloat a =&gt; Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; a
</span><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-var">fromRat''</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499386"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499385"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499388"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499387"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-533"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-534"></span><span>        </span><span id="local-6989586621679499386"><span class="annot"><span class="annottext">minEx :: Int
</span><a href="#local-6989586621679499386"><span class="hs-identifier hs-var hs-var">minEx</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">DBL_MIN_EXP</span><span>
</span><span id="line-535"></span><span>        </span><span id="local-6989586621679499385"><span class="annot"><span class="annottext">mantDigs :: Int
</span><a href="#local-6989586621679499385"><span class="hs-identifier hs-var hs-var">mantDigs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">DBL_MANT_DIG</span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-538"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-539"></span><span>    </span><span id="local-6989586621679499356"><span class="annot"><span class="annottext">pi :: Double
</span><a href="#local-6989586621679499356"><span class="hs-identifier hs-var hs-var hs-var hs-var">pi</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">3.141592653589793238</span></span><span>
</span><span id="line-540"></span><span>    </span><span id="local-6989586621679499355"><span class="annot"><span class="annottext">exp :: Double -&gt; Double
</span><a href="#local-6989586621679499355"><span class="hs-identifier hs-var hs-var hs-var hs-var">exp</span></a></span></span><span> </span><span id="local-6989586621679499354"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499354"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#expDouble"><span class="hs-identifier hs-var">expDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499354"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-541"></span><span>    </span><span id="local-6989586621679499352"><span class="annot"><span class="annottext">log :: Double -&gt; Double
</span><a href="#local-6989586621679499352"><span class="hs-identifier hs-var hs-var hs-var hs-var">log</span></a></span></span><span> </span><span id="local-6989586621679499351"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499351"><span class="hs-identifier hs-var">x</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#logDouble"><span class="hs-identifier hs-var">logDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499351"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-542"></span><span>    </span><span id="local-6989586621679499349"><span class="annot"><span class="annottext">sqrt :: Double -&gt; Double
</span><a href="#local-6989586621679499349"><span class="hs-identifier hs-var hs-var hs-var hs-var">sqrt</span></a></span></span><span> </span><span id="local-6989586621679499348"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499348"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#sqrtDouble"><span class="hs-identifier hs-var">sqrtDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499348"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-543"></span><span>    </span><span id="local-6989586621679499346"><span class="annot"><span class="annottext">sin :: Double -&gt; Double
</span><a href="#local-6989586621679499346"><span class="hs-identifier hs-var hs-var hs-var hs-var">sin</span></a></span></span><span>  </span><span id="local-6989586621679499345"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499345"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#sinDouble"><span class="hs-identifier hs-var">sinDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499345"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-544"></span><span>    </span><span id="local-6989586621679499343"><span class="annot"><span class="annottext">cos :: Double -&gt; Double
</span><a href="#local-6989586621679499343"><span class="hs-identifier hs-var hs-var hs-var hs-var">cos</span></a></span></span><span>  </span><span id="local-6989586621679499342"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499342"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#cosDouble"><span class="hs-identifier hs-var">cosDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499342"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-545"></span><span>    </span><span id="local-6989586621679499340"><span class="annot"><span class="annottext">tan :: Double -&gt; Double
</span><a href="#local-6989586621679499340"><span class="hs-identifier hs-var hs-var hs-var hs-var">tan</span></a></span></span><span>  </span><span id="local-6989586621679499339"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499339"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#tanDouble"><span class="hs-identifier hs-var">tanDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499339"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-546"></span><span>    </span><span id="local-6989586621679499337"><span class="annot"><span class="annottext">asin :: Double -&gt; Double
</span><a href="#local-6989586621679499337"><span class="hs-identifier hs-var hs-var hs-var hs-var">asin</span></a></span></span><span> </span><span id="local-6989586621679499336"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499336"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#asinDouble"><span class="hs-identifier hs-var">asinDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499336"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-547"></span><span>    </span><span id="local-6989586621679499334"><span class="annot"><span class="annottext">acos :: Double -&gt; Double
</span><a href="#local-6989586621679499334"><span class="hs-identifier hs-var hs-var hs-var hs-var">acos</span></a></span></span><span> </span><span id="local-6989586621679499333"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499333"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#acosDouble"><span class="hs-identifier hs-var">acosDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499333"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-548"></span><span>    </span><span id="local-6989586621679499331"><span class="annot"><span class="annottext">atan :: Double -&gt; Double
</span><a href="#local-6989586621679499331"><span class="hs-identifier hs-var hs-var hs-var hs-var">atan</span></a></span></span><span> </span><span id="local-6989586621679499330"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499330"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#atanDouble"><span class="hs-identifier hs-var">atanDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499330"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-549"></span><span>    </span><span id="local-6989586621679499328"><span class="annot"><span class="annottext">sinh :: Double -&gt; Double
</span><a href="#local-6989586621679499328"><span class="hs-identifier hs-var hs-var hs-var hs-var">sinh</span></a></span></span><span> </span><span id="local-6989586621679499327"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499327"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#sinhDouble"><span class="hs-identifier hs-var">sinhDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499327"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-550"></span><span>    </span><span id="local-6989586621679499325"><span class="annot"><span class="annottext">cosh :: Double -&gt; Double
</span><a href="#local-6989586621679499325"><span class="hs-identifier hs-var hs-var hs-var hs-var">cosh</span></a></span></span><span> </span><span id="local-6989586621679499324"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499324"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#coshDouble"><span class="hs-identifier hs-var">coshDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499324"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-551"></span><span>    </span><span id="local-6989586621679499322"><span class="annot"><span class="annottext">tanh :: Double -&gt; Double
</span><a href="#local-6989586621679499322"><span class="hs-identifier hs-var hs-var hs-var hs-var">tanh</span></a></span></span><span> </span><span id="local-6989586621679499321"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499321"><span class="hs-identifier hs-var">x</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#tanhDouble"><span class="hs-identifier hs-var">tanhDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499321"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-552"></span><span>    </span><span id="local-6989586621679499319"><span class="annot"><span class="annottext">** :: Double -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499319"><span class="hs-operator hs-var hs-var hs-var hs-var">(**)</span></a></span></span><span> </span><span id="local-6989586621679499318"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499318"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499317"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499317"><span class="hs-identifier hs-var">y</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#powerDouble"><span class="hs-identifier hs-var">powerDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499318"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499317"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-553"></span><span>    </span><span id="local-6989586621679499312"><span class="annot"><span class="annottext">logBase :: Double -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499312"><span class="hs-identifier hs-var hs-var hs-var hs-var">logBase</span></a></span></span><span> </span><span id="local-6989586621679499311"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499311"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679499310"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499310"><span class="hs-identifier hs-var">y</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499310"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499311"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span>    </span><span id="local-6989586621679499309"><span class="annot"><span class="annottext">asinh :: Double -&gt; Double
</span><a href="#local-6989586621679499309"><span class="hs-identifier hs-var hs-var hs-var hs-var">asinh</span></a></span></span><span> </span><span id="local-6989586621679499308"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499308"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#asinhDouble"><span class="hs-identifier hs-var">asinhDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499308"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-556"></span><span>    </span><span id="local-6989586621679499306"><span class="annot"><span class="annottext">acosh :: Double -&gt; Double
</span><a href="#local-6989586621679499306"><span class="hs-identifier hs-var hs-var hs-var hs-var">acosh</span></a></span></span><span> </span><span id="local-6989586621679499305"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499305"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#acoshDouble"><span class="hs-identifier hs-var">acoshDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499305"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-557"></span><span>    </span><span id="local-6989586621679499303"><span class="annot"><span class="annottext">atanh :: Double -&gt; Double
</span><a href="#local-6989586621679499303"><span class="hs-identifier hs-var hs-var hs-var hs-var">atanh</span></a></span></span><span> </span><span id="local-6989586621679499302"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499302"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#atanhDouble"><span class="hs-identifier hs-var">atanhDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499302"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span>    </span><span id="local-6989586621679499300"><span class="annot"><span class="annottext">log1p :: Double -&gt; Double
</span><a href="#local-6989586621679499300"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#log1pDouble"><span class="hs-identifier hs-var">log1pDouble</span></a></span><span>
</span><span id="line-560"></span><span>    </span><span id="local-6989586621679499298"><span class="annot"><span class="annottext">expm1 :: Double -&gt; Double
</span><a href="#local-6989586621679499298"><span class="hs-identifier hs-var hs-var hs-var hs-var">expm1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#expm1Double"><span class="hs-identifier hs-var">expm1Double</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span>    </span><span id="local-6989586621679499294"><span class="annot"><span class="annottext">log1mexp :: Double -&gt; Double
</span><a href="#local-6989586621679499294"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1mexp</span></a></span></span><span> </span><span id="local-6989586621679499293"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499293"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. (Ord a, Floating a) =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1mexpOrd"><span class="hs-identifier hs-var">log1mexpOrd</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499293"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-563"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1mexp"><span class="hs-pragma hs-type">log1mexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-564"></span><span>    </span><span id="local-6989586621679499284"><span class="annot"><span class="annottext">log1pexp :: Double -&gt; Double
</span><a href="#local-6989586621679499284"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1pexp</span></a></span></span><span> </span><span id="local-6989586621679499283"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-565"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">18</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
</span><a href="GHC.Float.html#log1pDouble"><span class="hs-identifier hs-var">log1pDouble</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-566"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">100</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-567"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499283"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-568"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1pexp"><span class="hs-pragma hs-type">log1pexp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span class="hs-comment">-- RULES for Integer and Int</span><span>
</span><span id="line-571"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-572"></span><span class="annot"><span class="hs-pragma">&quot;properFraction/Double-&gt;Integer&quot;</span></span><span>    </span><span class="annot"><a href="GHC.Real.html#properFraction"><span class="hs-pragma hs-type">properFraction</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#properFractionDoubleInteger"><span class="hs-pragma hs-type">properFractionDoubleInteger</span></a></span><span>
</span><span id="line-573"></span><span class="annot"><span class="hs-pragma">&quot;truncate/Double-&gt;Integer&quot;</span></span><span>          </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#truncateDoubleInteger"><span class="hs-pragma hs-type">truncateDoubleInteger</span></a></span><span>
</span><span id="line-574"></span><span class="annot"><span class="hs-pragma">&quot;floor/Double-&gt;Integer&quot;</span></span><span>             </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#floorDoubleInteger"><span class="hs-pragma hs-type">floorDoubleInteger</span></a></span><span>
</span><span id="line-575"></span><span class="annot"><span class="hs-pragma">&quot;ceiling/Double-&gt;Integer&quot;</span></span><span>           </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#ceilingDoubleInteger"><span class="hs-pragma hs-type">ceilingDoubleInteger</span></a></span><span>
</span><span id="line-576"></span><span class="annot"><span class="hs-pragma">&quot;round/Double-&gt;Integer&quot;</span></span><span>             </span><span class="annot"><a href="GHC.Real.html#round"><span class="hs-pragma hs-type">round</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#roundDoubleInteger"><span class="hs-pragma hs-type">roundDoubleInteger</span></a></span><span>
</span><span id="line-577"></span><span class="annot"><span class="hs-pragma">&quot;properFraction/Double-&gt;Int&quot;</span></span><span>        </span><span class="annot"><a href="GHC.Real.html#properFraction"><span class="hs-pragma hs-type">properFraction</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#properFractionDoubleInt"><span class="hs-pragma hs-type">properFractionDoubleInt</span></a></span><span>
</span><span id="line-578"></span><span class="annot"><span class="hs-pragma">&quot;truncate/Double-&gt;Int&quot;</span></span><span>              </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#double2Int"><span class="hs-pragma hs-type">double2Int</span></a></span><span>
</span><span id="line-579"></span><span class="annot"><span class="hs-pragma">&quot;floor/Double-&gt;Int&quot;</span></span><span>                 </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#floorDoubleInt"><span class="hs-pragma hs-type">floorDoubleInt</span></a></span><span>
</span><span id="line-580"></span><span class="annot"><span class="hs-pragma">&quot;ceiling/Double-&gt;Int&quot;</span></span><span>               </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#ceilingDoubleInt"><span class="hs-pragma hs-type">ceilingDoubleInt</span></a></span><span>
</span><span id="line-581"></span><span class="annot"><span class="hs-pragma">&quot;round/Double-&gt;Int&quot;</span></span><span>                 </span><span class="annot"><a href="GHC.Real.html#round"><span class="hs-pragma hs-type">round</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#roundDoubleInt"><span class="hs-pragma hs-type">roundDoubleInt</span></a></span><span>
</span><span id="line-582"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-583"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-584"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Real.html#RealFrac"><span class="hs-identifier hs-type">RealFrac</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-585"></span><span>
</span><span id="line-586"></span><span>        </span><span class="hs-comment">-- ceiling, floor, and truncate are all small</span><span>
</span><span id="line-587"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#ceiling"><span class="hs-pragma hs-type">ceiling</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-588"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#floor"><span class="hs-pragma hs-type">floor</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-589"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Real.html#truncate"><span class="hs-pragma hs-type">truncate</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span>    </span><span id="local-6989586621679499244"><span class="annot"><span class="annottext">properFraction :: forall b. Integral b =&gt; Double -&gt; (b, Double)
</span><a href="#local-6989586621679499244"><span class="hs-identifier hs-var hs-var hs-var hs-var">properFraction</span></a></span></span><span> </span><span id="local-6989586621679499243"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499243"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-592"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499243"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>      </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499242"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499242"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499241"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499241"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-593"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499241"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-594"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; b
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499242"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">b -&gt; Int -&gt; b
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499241"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.0</span></span><span class="hs-special">)</span><span>
</span><span id="line-595"></span><span>        </span><span class="hs-keyword">else</span><span>
</span><span id="line-596"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; (Integer, Integer)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-identifier hs-var">quotRem</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499242"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499241"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679499239"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499239"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499238"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499238"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-597"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; b
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499239"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Double
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499238"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499241"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-598"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-599"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-600"></span><span>
</span><span id="line-601"></span><span>    </span><span id="local-6989586621679499234"><span class="annot"><span class="annottext">truncate :: forall b. Integral b =&gt; Double -&gt; b
</span><a href="#local-6989586621679499234"><span class="hs-identifier hs-var hs-var hs-var hs-var">truncate</span></a></span></span><span> </span><span id="local-6989586621679499233"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499233"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (b, Double)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499233"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-602"></span><span>                     </span><span class="hs-special">(</span><span id="local-6989586621679499232"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499232"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Double
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499232"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-603"></span><span>
</span><span id="line-604"></span><span>    </span><span id="local-6989586621679499223"><span class="annot"><span class="annottext">round :: forall b. Integral b =&gt; Double -&gt; b
</span><a href="#local-6989586621679499223"><span class="hs-identifier hs-var hs-var hs-var hs-var">round</span></a></span></span><span> </span><span id="local-6989586621679499222"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499222"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (b, Double)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499222"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-605"></span><span>                     </span><span class="hs-special">(</span><span id="local-6989586621679499221"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499220"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499220"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-606"></span><span>                                </span><span id="local-6989586621679499213"><span class="annot"><span class="annottext">m :: b
</span><a href="#local-6989586621679499213"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499220"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span>
</span><span id="line-607"></span><span>                                </span><span id="local-6989586621679499209"><span class="annot"><span class="annottext">half_down :: Double
</span><a href="#local-6989586621679499209"><span class="hs-identifier hs-var hs-var">half_down</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499220"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.5</span></span><span>
</span><span id="line-608"></span><span>                              </span><span class="hs-keyword">in</span><span>
</span><span id="line-609"></span><span>                              </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499209"><span class="hs-identifier hs-var">half_down</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.0</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-610"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-611"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">b -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.Real.html#even"><span class="hs-identifier hs-var">even</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499221"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499213"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-612"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499213"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-613"></span><span>
</span><span id="line-614"></span><span>    </span><span id="local-6989586621679499199"><span class="annot"><span class="annottext">ceiling :: forall b. Integral b =&gt; Double -&gt; b
</span><a href="#local-6989586621679499199"><span class="hs-identifier hs-var hs-var hs-var hs-var">ceiling</span></a></span></span><span> </span><span id="local-6989586621679499198"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499198"><span class="hs-identifier hs-var">x</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (b, Double)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499198"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-615"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679499197"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499197"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499196"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499196"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499196"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499197"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499197"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span>    </span><span id="local-6989586621679499186"><span class="annot"><span class="annottext">floor :: forall b. Integral b =&gt; Double -&gt; b
</span><a href="#local-6989586621679499186"><span class="hs-identifier hs-var hs-var hs-var hs-var">floor</span></a></span></span><span> </span><span id="local-6989586621679499185"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499185"><span class="hs-identifier hs-var">x</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (b, Double)
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; (b, a)
</span><a href="GHC.Real.html#properFraction"><span class="hs-identifier hs-var">properFraction</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499185"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-618"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679499184"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499184"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499183"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499183"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499183"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0.0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499184"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679499184"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-619"></span><span>
</span><span id="line-620"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-621"></span><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679499164"><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-622"></span><span>    </span><span id="local-6989586621679499163"><span class="annot"><span class="annottext">floatRadix :: Double -&gt; Integer
</span><a href="#local-6989586621679499163"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatRadix</span></a></span></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">FLT_RADIX</span><span>        </span><span class="hs-comment">-- from float.h</span><span>
</span><span id="line-623"></span><span>    </span><span id="local-6989586621679499162"><span class="annot"><span class="annottext">floatDigits :: Double -&gt; Int
</span><a href="#local-6989586621679499162"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatDigits</span></a></span></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="hs-identifier">DBL_MANT_DIG</span><span>     </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-624"></span><span>    </span><span id="local-6989586621679499159"><span class="annot"><span class="annottext">floatRange :: Double -&gt; (Int, Int)
</span><a href="#local-6989586621679499159"><span class="hs-identifier hs-var hs-var hs-var hs-var">floatRange</span></a></span></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="hs-identifier">DBL_MIN_EXP</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">DBL_MAX_EXP</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-625"></span><span>
</span><span id="line-626"></span><span>    </span><span id="local-6989586621679499158"><span class="annot"><span class="annottext">decodeFloat :: Double -&gt; (Integer, Int)
</span><a href="#local-6989586621679499158"><span class="hs-identifier hs-var hs-var hs-var hs-var">decodeFloat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679499157"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679499157"><span class="hs-identifier hs-var">x#</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-627"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; (# Integer, Int# #)
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerDecodeDouble%23"><span class="hs-identifier hs-var">integerDecodeDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679499157"><span class="hs-identifier hs-var">x#</span></a></span><span>   </span><span class="hs-keyword">of</span><span>
</span><span id="line-628"></span><span>          </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679499156"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499156"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679499155"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499155"><span class="hs-identifier hs-var">j</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499156"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499155"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-629"></span><span>
</span><span id="line-630"></span><span>    </span><span id="local-6989586621679499154"><span class="annot"><span class="annottext">encodeFloat :: Integer -&gt; Int -&gt; Double
</span><a href="#local-6989586621679499154"><span class="hs-identifier hs-var hs-var hs-var hs-var">encodeFloat</span></a></span></span><span> </span><span id="local-6989586621679499153"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499153"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679499152"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499152"><span class="hs-identifier hs-var">j</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; Double#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerEncodeDouble%23"><span class="hs-identifier hs-var">integerEncodeDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499153"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679499152"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span>    </span><span id="local-6989586621679499146"><span class="annot"><span class="annottext">exponent :: Double -&gt; Int
</span><a href="#local-6989586621679499146"><span class="hs-identifier hs-var hs-var hs-var hs-var">exponent</span></a></span></span><span> </span><span id="local-6989586621679499145"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499145"><span class="hs-identifier hs-var">x</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499145"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-633"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499144"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499144"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499143"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499143"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499144"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499143"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499145"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span>    </span><span id="local-6989586621679499138"><span class="annot"><span class="annottext">significand :: Double -&gt; Double
</span><a href="#local-6989586621679499138"><span class="hs-identifier hs-var hs-var hs-var hs-var">significand</span></a></span></span><span> </span><span id="local-6989586621679499137"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499137"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499137"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-636"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499136"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499136"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Double
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499136"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499137"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span>
</span><span id="line-638"></span><span>    </span><span id="local-6989586621679499130"><span class="annot"><span class="annottext">scaleFloat :: Int -&gt; Double -&gt; Double
</span><a href="#local-6989586621679499130"><span class="hs-identifier hs-var hs-var hs-var hs-var">scaleFloat</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679499129"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499129"><span class="hs-identifier hs-var">x</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499129"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-639"></span><span>    </span><span class="annot"><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span id="local-6989586621679499128"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499128"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679499127"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499127"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-640"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679499126"><span class="hs-identifier hs-var">isFix</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499127"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-641"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Double -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499127"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-642"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679499125"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499125"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679499124"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499124"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Double
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679499125"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499124"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="GHC.Float.html#clamp"><span class="hs-identifier hs-var">clamp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499123"><span class="hs-identifier hs-var">bd</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499128"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-643"></span><span>                        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679499123"><span class="annot"><span class="annottext">bd :: Int
</span><a href="#local-6989586621679499123"><span class="hs-identifier hs-var hs-var">bd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">DBL_MAX_EXP</span><span> </span><span class="hs-glyph">-</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">DBL_MIN_EXP</span><span class="hs-special">)</span><span> </span><span class="hs-operator">+</span><span> </span><span class="hs-number">4</span><span class="hs-operator">*</span><span class="hs-identifier">DBL_MANT_DIG</span><span>
</span><span id="line-644"></span><span>                              </span><span id="local-6989586621679499126"><span class="annot"><span class="annottext">isFix :: Bool
</span><a href="#local-6989586621679499126"><span class="hs-identifier hs-var hs-var">isFix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499127"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
</span><a href="GHC.Float.html#isDoubleFinite"><span class="hs-identifier hs-var">isDoubleFinite</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499127"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-645"></span><span>
</span><span id="line-646"></span><span>    </span><span id="local-6989586621679499106"><span class="annot"><span class="annottext">isNaN :: Double -&gt; Bool
</span><a href="#local-6989586621679499106"><span class="hs-identifier hs-var hs-var hs-var hs-var">isNaN</span></a></span></span><span> </span><span id="local-6989586621679499105"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499105"><span class="hs-identifier hs-var">x</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
</span><a href="GHC.Float.html#isDoubleNaN"><span class="hs-identifier hs-var">isDoubleNaN</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499105"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-647"></span><span>    </span><span id="local-6989586621679499101"><span class="annot"><span class="annottext">isInfinite :: Double -&gt; Bool
</span><a href="#local-6989586621679499101"><span class="hs-identifier hs-var hs-var hs-var hs-var">isInfinite</span></a></span></span><span> </span><span id="local-6989586621679499100"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499100"><span class="hs-identifier hs-var">x</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
</span><a href="GHC.Float.html#isDoubleInfinite"><span class="hs-identifier hs-var">isDoubleInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499100"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-648"></span><span>    </span><span id="local-6989586621679499096"><span class="annot"><span class="annottext">isDenormalized :: Double -&gt; Bool
</span><a href="#local-6989586621679499096"><span class="hs-identifier hs-var hs-var hs-var hs-var">isDenormalized</span></a></span></span><span> </span><span id="local-6989586621679499095"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499095"><span class="hs-identifier hs-var">x</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
</span><a href="GHC.Float.html#isDoubleDenormalized"><span class="hs-identifier hs-var">isDoubleDenormalized</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499095"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-649"></span><span>    </span><span id="local-6989586621679499091"><span class="annot"><span class="annottext">isNegativeZero :: Double -&gt; Bool
</span><a href="#local-6989586621679499091"><span class="hs-identifier hs-var hs-var hs-var hs-var">isNegativeZero</span></a></span></span><span> </span><span id="local-6989586621679499090"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499090"><span class="hs-identifier hs-var">x</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Int
</span><a href="GHC.Float.html#isDoubleNegativeZero"><span class="hs-identifier hs-var">isDoubleNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499090"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-650"></span><span>    </span><span id="local-6989586621679499088"><span class="annot"><span class="annottext">isIEEE :: Double -&gt; Bool
</span><a href="#local-6989586621679499088"><span class="hs-identifier hs-var hs-var hs-var hs-var">isIEEE</span></a></span></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-651"></span><span>
</span><span id="line-652"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-653"></span><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679499085"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-654"></span><span>    </span><span id="local-6989586621679499081"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Double -&gt; ShowS
</span><a href="#local-6989586621679499081"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span>   </span><span id="local-6989586621679499080"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499080"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Double -&gt; ShowS) -&gt; Int -&gt; Double -&gt; ShowS
forall a. RealFloat a =&gt; (a -&gt; ShowS) -&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showSignedFloat"><span class="hs-identifier hs-var">showSignedFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; ShowS
forall a. RealFloat a =&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showFloat"><span class="hs-identifier hs-var">showFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679499080"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-655"></span><span>    </span><span id="local-6989586621679499078"><span class="annot"><span class="annottext">showList :: [Double] -&gt; ShowS
</span><a href="#local-6989586621679499078"><span class="hs-identifier hs-var hs-var hs-var hs-var">showList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Double -&gt; ShowS) -&gt; [Double] -&gt; ShowS
forall a. (a -&gt; ShowS) -&gt; [a] -&gt; ShowS
</span><a href="GHC.Show.html#showList__"><span class="hs-identifier hs-var">showList__</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Double -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-656"></span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-659"></span><span class="hs-comment">-- Enum instances</span><span>
</span><span id="line-660"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span class="hs-comment">{-
The @Enum@ instances for Floats and Doubles are slightly unusual.
The @toEnum@ function truncates numbers to Int.  The definitions
of @enumFrom@ and @enumFromThen@ allow floats to be used in arithmetic
series: [0,0.1 .. 1.0].  However, roundoff errors make these somewhat
dubious.  This example may have either 10 or 11 elements, depending on
how 0.1 is represented.

NOTE: The instances for Float and Double do not make use of the default
methods for @enumFromTo@ and @enumFromThenTo@, as these rely on there being
a `non-lossy' conversion to and from Ints. Instead we make use of the
1.2 default methods (back in the days when Enum had Ord as a superclass)
for these (@numericEnumFromTo@ and @numericEnumFromThenTo@ below.)
-}</span><span>
</span><span id="line-676"></span><span>
</span><span id="line-677"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-678"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-679"></span><span>    </span><span id="local-6989586621679499065"><span class="annot"><span class="annottext">succ :: Float -&gt; Float
</span><a href="GHC.Enum.html#succ"><span class="hs-identifier hs-var hs-var hs-var hs-var">succ</span></a></span></span><span> </span><span id="local-6989586621679499063"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499063"><span class="hs-identifier hs-var">x</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499063"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span>
</span><span id="line-680"></span><span>    </span><span id="local-6989586621679499060"><span class="annot"><span class="annottext">pred :: Float -&gt; Float
</span><a href="GHC.Enum.html#pred"><span class="hs-identifier hs-var hs-var hs-var hs-var">pred</span></a></span></span><span> </span><span id="local-6989586621679499058"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499058"><span class="hs-identifier hs-var">x</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621679499058"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1</span></span><span>
</span><span id="line-681"></span><span>    </span><span id="local-6989586621679499057"><span class="annot"><span class="annottext">toEnum :: Int -&gt; Float
</span><a href="GHC.Enum.html#toEnum"><span class="hs-identifier hs-var hs-var hs-var hs-var">toEnum</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Float
</span><a href="GHC.Float.RealFracMethods.html#int2Float"><span class="hs-identifier hs-var">int2Float</span></a></span><span>
</span><span id="line-682"></span><span>    </span><span id="local-6989586621679499052"><span class="annot"><span class="annottext">fromEnum :: Float -&gt; Int
</span><a href="GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromEnum</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; Int) -&gt; (Float -&gt; Integer) -&gt; Float -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Integer
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#truncate"><span class="hs-identifier hs-var">truncate</span></a></span><span>   </span><span class="hs-comment">-- may overflow</span><span>
</span><span id="line-683"></span><span>    </span><span id="local-6989586621679499048"><span class="annot"><span class="annottext">enumFrom :: Float -&gt; [Float]
</span><a href="GHC.Enum.html#enumFrom"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFrom</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; [Float]
forall a. Fractional a =&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFrom"><span class="hs-identifier hs-var">numericEnumFrom</span></a></span><span>
</span><span id="line-684"></span><span>    </span><span id="local-6989586621679499044"><span class="annot"><span class="annottext">enumFromTo :: Float -&gt; Float -&gt; [Float]
</span><a href="GHC.Enum.html#enumFromTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromTo</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; [Float]
forall a. (Ord a, Fractional a) =&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromTo"><span class="hs-identifier hs-var">numericEnumFromTo</span></a></span><span>
</span><span id="line-685"></span><span>    </span><span id="local-6989586621679499041"><span class="annot"><span class="annottext">enumFromThen :: Float -&gt; Float -&gt; [Float]
</span><a href="GHC.Enum.html#enumFromThen"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThen</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; [Float]
forall a. Fractional a =&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromThen"><span class="hs-identifier hs-var">numericEnumFromThen</span></a></span><span>
</span><span id="line-686"></span><span>    </span><span id="local-6989586621679499037"><span class="annot"><span class="annottext">enumFromThenTo :: Float -&gt; Float -&gt; Float -&gt; [Float]
</span><a href="GHC.Enum.html#enumFromThenTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThenTo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float -&gt; [Float]
forall a. (Ord a, Fractional a) =&gt; a -&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromThenTo"><span class="hs-identifier hs-var">numericEnumFromThenTo</span></a></span><span>
</span><span id="line-687"></span><span>
</span><span id="line-688"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-689"></span><span class="hs-keyword">instance</span><span>  </span><span class="annot"><a href="GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-690"></span><span>    </span><span id="local-6989586621679499024"><span class="annot"><span class="annottext">succ :: Double -&gt; Double
</span><a href="#local-6989586621679499024"><span class="hs-identifier hs-var hs-var hs-var hs-var">succ</span></a></span></span><span> </span><span id="local-6989586621679499023"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499023"><span class="hs-identifier hs-var">x</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499023"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span>
</span><span id="line-691"></span><span>    </span><span id="local-6989586621679499020"><span class="annot"><span class="annottext">pred :: Double -&gt; Double
</span><a href="#local-6989586621679499020"><span class="hs-identifier hs-var hs-var hs-var hs-var">pred</span></a></span></span><span> </span><span id="local-6989586621679499019"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499019"><span class="hs-identifier hs-var">x</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621679499019"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">1</span></span><span>
</span><span id="line-692"></span><span>    </span><span id="local-6989586621679499018"><span class="annot"><span class="annottext">toEnum :: Int -&gt; Double
</span><a href="#local-6989586621679499018"><span class="hs-identifier hs-var hs-var hs-var hs-var">toEnum</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Double
</span><a href="GHC.Float.RealFracMethods.html#int2Double"><span class="hs-identifier hs-var">int2Double</span></a></span><span>
</span><span id="line-693"></span><span>    </span><span id="local-6989586621679499014"><span class="annot"><span class="annottext">fromEnum :: Double -&gt; Int
</span><a href="#local-6989586621679499014"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromEnum</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; Int) -&gt; (Double -&gt; Integer) -&gt; Double -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Integer
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#truncate"><span class="hs-identifier hs-var">truncate</span></a></span><span>   </span><span class="hs-comment">-- may overflow</span><span>
</span><span id="line-694"></span><span>    </span><span id="local-6989586621679499012"><span class="annot"><span class="annottext">enumFrom :: Double -&gt; [Double]
</span><a href="GHC.Enum.html#enumFrom"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFrom</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; [Double]
forall a. Fractional a =&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFrom"><span class="hs-identifier hs-var">numericEnumFrom</span></a></span><span>
</span><span id="line-695"></span><span>    </span><span id="local-6989586621679499009"><span class="annot"><span class="annottext">enumFromTo :: Double -&gt; Double -&gt; [Double]
</span><a href="GHC.Enum.html#enumFromTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromTo</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; [Double]
forall a. (Ord a, Fractional a) =&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromTo"><span class="hs-identifier hs-var">numericEnumFromTo</span></a></span><span>
</span><span id="line-696"></span><span>    </span><span id="local-6989586621679499007"><span class="annot"><span class="annottext">enumFromThen :: Double -&gt; Double -&gt; [Double]
</span><a href="GHC.Enum.html#enumFromThen"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThen</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; [Double]
forall a. Fractional a =&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromThen"><span class="hs-identifier hs-var">numericEnumFromThen</span></a></span><span>
</span><span id="line-697"></span><span>    </span><span id="local-6989586621679499004"><span class="annot"><span class="annottext">enumFromThenTo :: Double -&gt; Double -&gt; Double -&gt; [Double]
</span><a href="GHC.Enum.html#enumFromThenTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThenTo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double -&gt; [Double]
forall a. (Ord a, Fractional a) =&gt; a -&gt; a -&gt; a -&gt; [a]
</span><a href="GHC.Real.html#numericEnumFromThenTo"><span class="hs-identifier hs-var">numericEnumFromThenTo</span></a></span><span>
</span><span id="line-698"></span><span>
</span><span id="line-699"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-700"></span><span class="hs-comment">-- Printing floating point</span><span>
</span><span id="line-701"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value to full precision</span><span>
</span><span id="line-704"></span><span class="hs-comment">-- using standard decimal notation for arguments whose absolute value lies</span><span>
</span><span id="line-705"></span><span class="hs-comment">-- between @0.1@ and @9,999,999@, and scientific notation otherwise.</span><span>
</span><span id="line-706"></span><span id="local-6989586621679500258"><span class="annot"><a href="GHC.Float.html#showFloat"><span class="hs-identifier hs-type">showFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500258"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500258"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-707"></span><span id="showFloat"><span class="annot"><span class="annottext">showFloat :: forall a. RealFloat a =&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showFloat"><span class="hs-identifier hs-var hs-var">showFloat</span></a></span></span><span> </span><span id="local-6989586621679499001"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499001"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; a -&gt; String
forall a. RealFloat a =&gt; FFFormat -&gt; Maybe Int -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFGeneric"><span class="hs-identifier hs-var">FFGeneric</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679499001"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-708"></span><span>
</span><span id="line-709"></span><span class="hs-comment">-- These are the format types.  This type is not exported.</span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span class="hs-keyword">data</span><span> </span><span id="FFFormat"><span class="annot"><a href="GHC.Float.html#FFFormat"><span class="hs-identifier hs-var">FFFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FFExponent"><span class="annot"><a href="GHC.Float.html#FFExponent"><span class="hs-identifier hs-var">FFExponent</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="FFFixed"><span class="annot"><a href="GHC.Float.html#FFFixed"><span class="hs-identifier hs-var">FFFixed</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="FFGeneric"><span class="annot"><a href="GHC.Float.html#FFGeneric"><span class="hs-identifier hs-var">FFGeneric</span></a></span></span><span>
</span><span id="line-712"></span><span>
</span><span id="line-713"></span><span class="hs-comment">-- This is just a compatibility stub, as the &quot;alt&quot; argument formerly</span><span>
</span><span id="line-714"></span><span class="hs-comment">-- didn't exist.</span><span>
</span><span id="line-715"></span><span id="local-6989586621679500241"><span class="annot"><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-type">formatRealFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500241"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Float.html#FFFormat"><span class="hs-identifier hs-type">FFFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500241"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-716"></span><span id="formatRealFloat"><span class="annot"><span class="annottext">formatRealFloat :: forall a. RealFloat a =&gt; FFFormat -&gt; Maybe Int -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloat"><span class="hs-identifier hs-var hs-var">formatRealFloat</span></a></span></span><span> </span><span id="local-6989586621679498993"><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498993"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679498992"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679498992"><span class="hs-identifier hs-var">decs</span></a></span></span><span> </span><span id="local-6989586621679498991"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498991"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
forall a.
RealFloat a =&gt;
FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloatAlt"><span class="hs-identifier hs-var">formatRealFloatAlt</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498993"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679498992"><span class="hs-identifier hs-var">decs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498991"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-717"></span><span>
</span><span id="line-718"></span><span id="local-6989586621679500238"><span class="annot"><a href="GHC.Float.html#formatRealFloatAlt"><span class="hs-identifier hs-type">formatRealFloatAlt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500238"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Float.html#FFFormat"><span class="hs-identifier hs-type">FFFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500238"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-719"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-720"></span><span id="formatRealFloatAlt"><span class="annot"><span class="annottext">formatRealFloatAlt :: forall a.
RealFloat a =&gt;
FFFormat -&gt; Maybe Int -&gt; Bool -&gt; a -&gt; String
</span><a href="GHC.Float.html#formatRealFloatAlt"><span class="hs-identifier hs-var hs-var">formatRealFloatAlt</span></a></span></span><span> </span><span id="local-6989586621679498972"><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498972"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679498971"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679498971"><span class="hs-identifier hs-var">decs</span></a></span></span><span> </span><span id="local-6989586621679498970"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679498970"><span class="hs-identifier hs-var">alt</span></a></span></span><span> </span><span id="local-6989586621679498969"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-721"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNaN"><span class="hs-identifier hs-var">isNaN</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NaN&quot;</span></span><span>
</span><span id="line-722"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-Infinity&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Infinity&quot;</span></span><span>
</span><span id="line-723"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">FFFormat -&gt; ([Int], Int) -&gt; String
</span><a href="#local-6989586621679498968"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498972"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; a -&gt; ([Int], Int)
forall a. RealFloat a =&gt; Integer -&gt; a -&gt; ([Int], Int)
</span><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-724"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FFFormat -&gt; ([Int], Int) -&gt; String
</span><a href="#local-6989586621679498968"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498972"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; a -&gt; ([Int], Int)
forall a. RealFloat a =&gt; Integer -&gt; a -&gt; ([Int], Int)
</span><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498969"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-725"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-726"></span><span>  </span><span id="local-6989586621679498966"><span class="annot"><span class="annottext">base :: Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-727"></span><span>
</span><span id="line-728"></span><span>  </span><span id="local-6989586621679498968"><span class="annot"><span class="annottext">doFmt :: FFFormat -&gt; ([Int], Int) -&gt; String
</span><a href="#local-6989586621679498968"><span class="hs-identifier hs-var hs-var">doFmt</span></a></span></span><span> </span><span id="local-6989586621679498938"><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498938"><span class="hs-identifier hs-var">format</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498937"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498936"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-729"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498935"><span class="annot"><span class="annottext">ds :: String
</span><a href="#local-6989586621679498935"><span class="hs-identifier hs-var hs-var">ds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-730"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="#local-6989586621679498938"><span class="hs-identifier hs-var">format</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-731"></span><span>     </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFGeneric"><span class="hs-identifier hs-var">FFGeneric</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-732"></span><span>      </span><span class="annot"><span class="annottext">FFFormat -&gt; ([Int], Int) -&gt; String
</span><a href="#local-6989586621679498968"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFExponent"><span class="hs-identifier hs-var">FFExponent</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFFixed"><span class="hs-identifier hs-var">FFFixed</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-733"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-734"></span><span>     </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFExponent"><span class="hs-identifier hs-var">FFExponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-735"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679498971"><span class="hs-identifier hs-var">decs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-736"></span><span>       </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-737"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498930"><span class="annot"><span class="annottext">show_e' :: String
</span><a href="#local-6989586621679498930"><span class="hs-identifier hs-var hs-var">show_e'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-738"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498935"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-739"></span><span>          </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0.0e0&quot;</span></span><span>
</span><span id="line-740"></span><span>          </span><span class="hs-special">[</span><span id="local-6989586621679498928"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498928"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498928"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.0e&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498930"><span class="hs-identifier hs-var">show_e'</span></a></span><span>
</span><span id="line-741"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679498927"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498927"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498926"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498926"><span class="hs-identifier hs-var">ds'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498927"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498926"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;e&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498930"><span class="hs-identifier hs-var">show_e'</span></a></span><span>
</span><span id="line-742"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;formatRealFloat/doFmt/FFExponent: []&quot;</span></span><span>
</span><span id="line-743"></span><span>       </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679498924"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498924"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498924"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-744"></span><span>        </span><span class="hs-comment">-- handle this case specifically since we need to omit the</span><span>
</span><span id="line-745"></span><span>        </span><span class="hs-comment">-- decimal point as well (#15115).</span><span>
</span><span id="line-746"></span><span>        </span><span class="hs-comment">-- Note that this handles negative precisions as well for consistency</span><span>
</span><span id="line-747"></span><span>        </span><span class="hs-comment">-- (see #15509).</span><span>
</span><span id="line-748"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-749"></span><span>          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0e0&quot;</span></span><span>
</span><span id="line-750"></span><span>          </span><span class="annot"><span class="annottext">[Int]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-751"></span><span>           </span><span class="hs-keyword">let</span><span>
</span><span id="line-752"></span><span>             </span><span class="hs-special">(</span><span id="local-6989586621679498923"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498923"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498922"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498922"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-753"></span><span>             </span><span id="local-6989586621679498918"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498918"><span class="hs-identifier hs-var">n</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498923"><span class="hs-identifier hs-var">ei</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#init"><span class="hs-identifier hs-var">init</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498922"><span class="hs-identifier hs-var">is'</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498922"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-754"></span><span>           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498918"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498923"><span class="hs-identifier hs-var">ei</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-755"></span><span>       </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679498916"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498916"><span class="hs-identifier hs-var">dec</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-756"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498913"><span class="annot"><span class="annottext">dec' :: Int
</span><a href="#local-6989586621679498913"><span class="hs-identifier hs-var hs-var">dec'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498916"><span class="hs-identifier hs-var">dec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-757"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-758"></span><span>         </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498913"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; String
forall a. a -&gt; [a]
</span><a href="GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;e0&quot;</span></span><span>
</span><span id="line-759"></span><span>         </span><span class="annot"><span class="annottext">[Int]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-760"></span><span>          </span><span class="hs-keyword">let</span><span>
</span><span id="line-761"></span><span>           </span><span class="hs-special">(</span><span id="local-6989586621679498907"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498907"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498906"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498906"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498913"><span class="hs-identifier hs-var">dec'</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-762"></span><span>           </span><span class="hs-special">(</span><span id="local-6989586621679498903"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498903"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498902"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498902"><span class="hs-identifier hs-var">ds'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498907"><span class="hs-identifier hs-var">ei</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#init"><span class="hs-identifier hs-var">init</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498906"><span class="hs-identifier hs-var">is'</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498906"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-763"></span><span>          </span><span class="hs-keyword">in</span><span>
</span><span id="line-764"></span><span>          </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498903"><span class="hs-identifier hs-var">d</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498902"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498907"><span class="hs-identifier hs-var">ei</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-765"></span><span>     </span><span class="annot"><span class="annottext">FFFormat
</span><a href="GHC.Float.html#FFFixed"><span class="hs-identifier hs-var">FFFixed</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-766"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-767"></span><span>       </span><span id="local-6989586621679498901"><span class="annot"><span class="annottext">mk0 :: ShowS
</span><a href="#local-6989586621679498901"><span class="hs-identifier hs-var hs-var">mk0</span></a></span></span><span> </span><span id="local-6989586621679498900"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498900"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498900"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0&quot;</span></span><span> </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498900"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-768"></span><span>      </span><span class="hs-keyword">in</span><span>
</span><span id="line-769"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679498971"><span class="hs-identifier hs-var">decs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-770"></span><span>       </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-771"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;0.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498935"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-772"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-773"></span><span>             </span><span class="hs-keyword">let</span><span>
</span><span id="line-774"></span><span>                </span><span id="local-6989586621679498890"><span class="annot"><span class="annottext">f :: a -&gt; String -&gt; ShowS
</span><a href="#local-6989586621679498890"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679498889"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498889"><span class="hs-identifier hs-var">s</span></a></span></span><span>    </span><span id="local-6989586621679498888"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498888"><span class="hs-identifier hs-var">rs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679498901"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498889"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679498901"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498888"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-775"></span><span>                </span><span class="annot"><a href="#local-6989586621679498890"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679498886"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498886"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679498885"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498885"><span class="hs-identifier hs-var">s</span></a></span></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; String -&gt; ShowS
</span><a href="#local-6989586621679498890"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498886"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498885"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-776"></span><span>                </span><span class="annot"><a href="#local-6989586621679498890"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679498884"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498884"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679498883"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498883"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498882"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498882"><span class="hs-identifier hs-var">r</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498881"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498881"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; String -&gt; ShowS
</span><a href="#local-6989586621679498890"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498884"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498882"><span class="hs-identifier hs-var">r</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498883"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498881"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-777"></span><span>             </span><span class="hs-keyword">in</span><span>
</span><span id="line-778"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; ShowS
forall {a}. (Eq a, Num a) =&gt; a -&gt; String -&gt; ShowS
</span><a href="#local-6989586621679498890"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498935"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-779"></span><span>       </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679498880"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498880"><span class="hs-identifier hs-var">dec</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-780"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498877"><span class="annot"><span class="annottext">dec' :: Int
</span><a href="#local-6989586621679498877"><span class="hs-identifier hs-var hs-var">dec'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498880"><span class="hs-identifier hs-var">dec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-781"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-782"></span><span>         </span><span class="hs-keyword">let</span><span>
</span><span id="line-783"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679498875"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498875"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498874"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498874"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498877"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-784"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679498872"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498872"><span class="hs-identifier hs-var">ls</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498871"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498871"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; (String, String)
forall a. Int -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#splitAt"><span class="hs-identifier hs-var">splitAt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498875"><span class="hs-identifier hs-var">ei</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498874"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-785"></span><span>         </span><span class="hs-keyword">in</span><span>
</span><span id="line-786"></span><span>         </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679498901"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498872"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498871"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679498970"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498871"><span class="hs-identifier hs-var">rs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-787"></span><span>        </span><span class="hs-keyword">else</span><span>
</span><span id="line-788"></span><span>         </span><span class="hs-keyword">let</span><span>
</span><span id="line-789"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679498865"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498865"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498864"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498864"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498966"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498877"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int]
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498936"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int] -&gt; [Int]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498937"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-790"></span><span>          </span><span id="local-6989586621679498860"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498860"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498859"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498859"><span class="hs-identifier hs-var">ds'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Show.html#intToDigit"><span class="hs-identifier hs-var">intToDigit</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498865"><span class="hs-identifier hs-var">ei</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498864"><span class="hs-identifier hs-var">is'</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498864"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-791"></span><span>         </span><span class="hs-keyword">in</span><span>
</span><span id="line-792"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679498860"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498859"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679498970"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679498859"><span class="hs-identifier hs-var">ds'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-793"></span><span>
</span><span id="line-794"></span><span>
</span><span id="line-795"></span><span class="annot"><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-type">roundTo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-796"></span><span id="roundTo"><span class="annot"><span class="annottext">roundTo :: Int -&gt; Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="GHC.Float.html#roundTo"><span class="hs-identifier hs-var hs-var">roundTo</span></a></span></span><span> </span><span id="local-6989586621679498858"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498858"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679498857"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498857"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679498856"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498856"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-797"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; [Int] -&gt; (Int, [Int])
</span><a href="#local-6989586621679498855"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498857"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498856"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-798"></span><span>    </span><span id="local-6989586621679498854"><span class="annot"><span class="annottext">x :: (Int, [Int])
</span><a href="#local-6989586621679498854"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[Int]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Int, [Int])
</span><a href="#local-6989586621679498854"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-799"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span id="local-6989586621679498853"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498853"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498853"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span>    </span><span class="annot"><span class="annottext">(Int, [Int])
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Int, [Int])
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;roundTo: bad Value&quot;</span></span><span>
</span><span id="line-801"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-802"></span><span>  </span><span id="local-6989586621679498850"><span class="annot"><span class="annottext">b2 :: Int
</span><a href="#local-6989586621679498850"><span class="hs-identifier hs-var hs-var">b2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498858"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-803"></span><span>
</span><span id="line-804"></span><span>  </span><span id="local-6989586621679498855"><span class="annot"><span class="annottext">f :: Int -&gt; Bool -&gt; [Int] -&gt; (Int, [Int])
</span><a href="#local-6989586621679498855"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679498833"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498833"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int]
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498833"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-805"></span><span>  </span><span class="annot"><a href="#local-6989586621679498855"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679498832"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679498832"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498831"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498831"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498830"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498830"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498831"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498850"><span class="hs-identifier hs-var">b2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679498832"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; [Int] -&gt; Bool
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498830"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Round to even when at exactly half the base</span><span>
</span><span id="line-806"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498831"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498850"><span class="hs-identifier hs-var">b2</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-807"></span><span>  </span><span class="annot"><a href="#local-6989586621679498855"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679498828"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498828"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498827"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498827"><span class="hs-identifier hs-var">i</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679498826"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498826"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-808"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498825"><span class="hs-identifier hs-var">i'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498858"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498824"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-809"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498825"><span class="hs-identifier hs-var">i'</span></a></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498824"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-810"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-811"></span><span>       </span><span class="hs-special">(</span><span id="local-6989586621679498820"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498820"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498824"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498824"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; [Int] -&gt; (Int, [Int])
</span><a href="#local-6989586621679498855"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498828"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.Real.html#even"><span class="hs-identifier hs-var">even</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498827"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679498826"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-812"></span><span>       </span><span id="local-6989586621679498825"><span class="annot"><span class="annottext">i' :: Int
</span><a href="#local-6989586621679498825"><span class="hs-identifier hs-var hs-var">i'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498820"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498827"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span class="hs-comment">-- Based on &quot;Printing Floating-Point Numbers Quickly and Accurately&quot;</span><span>
</span><span id="line-815"></span><span class="hs-comment">-- by R.G. Burger and R.K. Dybvig in PLDI 96.</span><span>
</span><span id="line-816"></span><span class="hs-comment">-- This version uses a much slower logarithm estimator. It should be improved.</span><span>
</span><span id="line-817"></span><span>
</span><span id="line-818"></span><span class="hs-comment">-- | 'floatToDigits' takes a base and a non-negative 'RealFloat' number,</span><span>
</span><span id="line-819"></span><span class="hs-comment">-- and returns a list of digits and an exponent.</span><span>
</span><span id="line-820"></span><span class="hs-comment">-- In particular, if @x&gt;=0@, and</span><span>
</span><span id="line-821"></span><span class="hs-comment">--</span><span>
</span><span id="line-822"></span><span class="hs-comment">-- &gt; floatToDigits base x = ([d1,d2,...,dn], e)</span><span>
</span><span id="line-823"></span><span class="hs-comment">--</span><span>
</span><span id="line-824"></span><span class="hs-comment">-- then</span><span>
</span><span id="line-825"></span><span class="hs-comment">--</span><span>
</span><span id="line-826"></span><span class="hs-comment">--      (1) @n &gt;= 1@</span><span>
</span><span id="line-827"></span><span class="hs-comment">--</span><span>
</span><span id="line-828"></span><span class="hs-comment">--      (2) @x = 0.d1d2...dn * (base**e)@</span><span>
</span><span id="line-829"></span><span class="hs-comment">--</span><span>
</span><span id="line-830"></span><span class="hs-comment">--      (3) @0 &lt;= di &lt;= base-1@</span><span>
</span><span id="line-831"></span><span>
</span><span id="line-832"></span><span id="local-6989586621679500236"><span class="annot"><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-type">floatToDigits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500236"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500236"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-833"></span><span id="floatToDigits"><span class="annot"><span class="annottext">floatToDigits :: forall a. RealFloat a =&gt; Integer -&gt; a -&gt; ([Int], Int)
</span><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-var hs-var">floatToDigits</span></a></span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-834"></span><span class="annot"><a href="GHC.Float.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span id="local-6989586621679498785"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679498784"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498784"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-835"></span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-836"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679498782"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498782"><span class="hs-identifier hs-var">f0</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498781"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498781"><span class="hs-identifier hs-var">e0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498784"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-837"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679498779"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498779"><span class="hs-identifier hs-var">minExp0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int, Int)
forall a. RealFloat a =&gt; a -&gt; (Int, Int)
</span><a href="GHC.Float.html#floatRange"><span class="hs-identifier hs-var">floatRange</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498784"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-838"></span><span>  </span><span id="local-6989586621679498777"><span class="annot"><span class="annottext">p :: Int
</span><a href="#local-6989586621679498777"><span class="hs-identifier hs-var hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498784"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-839"></span><span>  </span><span id="local-6989586621679498775"><span class="annot"><span class="annottext">b :: Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Integer
forall a. RealFloat a =&gt; a -&gt; Integer
</span><a href="GHC.Float.html#floatRadix"><span class="hs-identifier hs-var">floatRadix</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498784"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-840"></span><span>  </span><span id="local-6989586621679498773"><span class="annot"><span class="annottext">minExp :: Int
</span><a href="#local-6989586621679498773"><span class="hs-identifier hs-var hs-var">minExp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498779"><span class="hs-identifier hs-var">minExp0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498777"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-comment">-- the real minimum exponent</span><span>
</span><span id="line-841"></span><span>  </span><span class="hs-comment">-- Haskell requires that f be adjusted so denormalized numbers</span><span>
</span><span id="line-842"></span><span>  </span><span class="hs-comment">-- will have an impossibly low exponent.  Adjust for this.</span><span>
</span><span id="line-843"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679498768"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498767"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-844"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498765"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679498765"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498773"><span class="hs-identifier hs-var">minExp</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498781"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-845"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498765"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498782"><span class="hs-identifier hs-var">f0</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498765"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498781"><span class="hs-identifier hs-var">e0</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498765"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498782"><span class="hs-identifier hs-var">f0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498781"><span class="hs-identifier hs-var">e0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-846"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679498727"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498727"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498726"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498726"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498725"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498725"><span class="hs-identifier hs-var">mUp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498724"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498724"><span class="hs-identifier hs-var">mDn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-847"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-848"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498723"><span class="annot"><span class="annottext">be :: Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var hs-var">be</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-849"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498777"><span class="hs-identifier hs-var">p</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-850"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- according to Burger and Dybvig</span><span>
</span><span id="line-851"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-852"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498723"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-853"></span><span>   </span><span class="hs-keyword">else</span><span>
</span><span id="line-854"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498773"><span class="hs-identifier hs-var">minExp</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498777"><span class="hs-identifier hs-var">p</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-855"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-856"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-857"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-858"></span><span>  </span><span class="annot"><a href="#local-6989586621679498722"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-859"></span><span>  </span><span id="local-6989586621679498722"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679498722"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-860"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-861"></span><span>    </span><span class="annot"><a href="#local-6989586621679498721"><span class="hs-identifier hs-type">k0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-862"></span><span>    </span><span id="local-6989586621679498721"><span class="annot"><span class="annottext">k0 :: Int
</span><a href="#local-6989586621679498721"><span class="hs-identifier hs-var hs-var">k0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-863"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-864"></span><span>        </span><span class="hs-comment">-- logBase 10 2 is very slightly larger than 8651/28738</span><span>
</span><span id="line-865"></span><span>        </span><span class="hs-comment">-- (about 5.3558e-10), so if log x &gt;= 0, the approximation</span><span>
</span><span id="line-866"></span><span>        </span><span class="hs-comment">-- k1 is too small, hence we add one and need one fixup step less.</span><span>
</span><span id="line-867"></span><span>        </span><span class="hs-comment">-- If log x &lt; 0, the approximation errs rather on the high side.</span><span>
</span><span id="line-868"></span><span>        </span><span class="hs-comment">-- That is usually more than compensated for by ignoring the</span><span>
</span><span id="line-869"></span><span>        </span><span class="hs-comment">-- fractional part of logBase 2 x, but when x is a power of 1/2</span><span>
</span><span id="line-870"></span><span>        </span><span class="hs-comment">-- or slightly larger and the exponent is a multiple of the</span><span>
</span><span id="line-871"></span><span>        </span><span class="hs-comment">-- denominator of the rational approximation to logBase 10 2,</span><span>
</span><span id="line-872"></span><span>        </span><span class="hs-comment">-- k1 is larger than logBase 10 x. If k1 &gt; 1 + logBase 10 x,</span><span>
</span><span id="line-873"></span><span>        </span><span class="hs-comment">-- we get a leading zero-digit we don't want.</span><span>
</span><span id="line-874"></span><span>        </span><span class="hs-comment">-- With the approximation 3/10, this happened for</span><span>
</span><span id="line-875"></span><span>        </span><span class="hs-comment">-- 0.5^1030, 0.5^1040, ..., 0.5^1070 and values close above.</span><span>
</span><span id="line-876"></span><span>        </span><span class="hs-comment">-- The approximation 8651/28738 guarantees k1 &lt; 1 + logBase 10 x</span><span>
</span><span id="line-877"></span><span>        </span><span class="hs-comment">-- for IEEE-ish floating point types with exponent fields</span><span>
</span><span id="line-878"></span><span>        </span><span class="hs-comment">-- &lt;= 17 bits and mantissae of several thousand bits, earlier</span><span>
</span><span id="line-879"></span><span>        </span><span class="hs-comment">-- convergents to logBase 10 2 would fail for long double.</span><span>
</span><span id="line-880"></span><span>        </span><span class="hs-comment">-- Using quot instead of div is a little faster and requires</span><span>
</span><span id="line-881"></span><span>        </span><span class="hs-comment">-- fewer fixup steps for negative lx.</span><span>
</span><span id="line-882"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498717"><span class="annot"><span class="annottext">lx :: Int
</span><a href="#local-6989586621679498717"><span class="hs-identifier hs-var hs-var">lx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498777"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498781"><span class="hs-identifier hs-var">e0</span></a></span><span>
</span><span id="line-883"></span><span>            </span><span id="local-6989586621679498712"><span class="annot"><span class="annottext">k1 :: Int
</span><a href="#local-6989586621679498712"><span class="hs-identifier hs-var hs-var">k1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498717"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8651</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">28738</span></span><span>
</span><span id="line-884"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498717"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498712"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498712"><span class="hs-identifier hs-var">k1</span></a></span><span>
</span><span id="line-885"></span><span>     </span><span class="hs-keyword">else</span><span>
</span><span id="line-886"></span><span>        </span><span class="hs-comment">-- f :: Integer, log :: Float -&gt; Float,</span><span>
</span><span id="line-887"></span><span>        </span><span class="hs-comment">--               ceiling :: Float -&gt; Int</span><span>
</span><span id="line-888"></span><span>        </span><span class="annot"><span class="annottext">Float -&gt; Int
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#ceiling"><span class="hs-identifier hs-var">ceiling</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498768"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-889"></span><span>                 </span><span class="annot"><span class="annottext">Int -&gt; Float
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498767"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498775"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span>
</span><span id="line-890"></span><span>                   </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-891"></span><span class="hs-comment">--WAS:            fromInt e * log (fromInteger b))</span><span>
</span><span id="line-892"></span><span>
</span><span id="line-893"></span><span>    </span><span id="local-6989586621679498698"><span class="annot"><span class="annottext">fixup :: Int -&gt; Int
</span><a href="#local-6989586621679498698"><span class="hs-identifier hs-var hs-var">fixup</span></a></span></span><span> </span><span id="local-6989586621679498697"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-894"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-895"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498727"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498725"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498726"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679498698"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-896"></span><span>      </span><span class="hs-keyword">else</span><span>
</span><span id="line-897"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498727"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498725"><span class="hs-identifier hs-var">mUp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498726"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679498698"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498697"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-898"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-899"></span><span>   </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679498698"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498721"><span class="hs-identifier hs-var">k0</span></a></span><span>
</span><span id="line-900"></span><span>
</span><span id="line-901"></span><span>  </span><span id="local-6989586621679498686"><span class="annot"><span class="annottext">gen :: [Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
</span><a href="#local-6989586621679498686"><span class="hs-identifier hs-var hs-var">gen</span></a></span></span><span> </span><span id="local-6989586621679498685"><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span></span><span> </span><span id="local-6989586621679498684"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498684"><span class="hs-identifier hs-var">rn</span></a></span></span><span> </span><span id="local-6989586621679498683"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498683"><span class="hs-identifier hs-var">sN</span></a></span></span><span> </span><span id="local-6989586621679498682"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498682"><span class="hs-identifier hs-var">mUpN</span></a></span></span><span> </span><span id="local-6989586621679498681"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498681"><span class="hs-identifier hs-var">mDnN</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-902"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-903"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679498678"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498677"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498677"><span class="hs-identifier hs-var">rn'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498684"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; (Integer, Integer)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-operator hs-var">`quotRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498683"><span class="hs-identifier hs-var">sN</span></a></span><span>
</span><span id="line-904"></span><span>    </span><span id="local-6989586621679498675"><span class="annot"><span class="annottext">mUpN' :: Integer
</span><a href="#local-6989586621679498675"><span class="hs-identifier hs-var hs-var">mUpN'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498682"><span class="hs-identifier hs-var">mUpN</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-905"></span><span>    </span><span id="local-6989586621679498673"><span class="annot"><span class="annottext">mDnN' :: Integer
</span><a href="#local-6989586621679498673"><span class="hs-identifier hs-var hs-var">mDnN'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498681"><span class="hs-identifier hs-var">mDnN</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-906"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-907"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498677"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498673"><span class="hs-identifier hs-var">mDnN'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498677"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498675"><span class="hs-identifier hs-var">mUpN'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498683"><span class="hs-identifier hs-var">sN</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-908"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Integer] -&gt; [Integer]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-909"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Integer] -&gt; [Integer]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-910"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498677"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498683"><span class="hs-identifier hs-var">sN</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Integer] -&gt; [Integer]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Integer] -&gt; [Integer]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-911"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
</span><a href="#local-6989586621679498686"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498678"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">Integer -&gt; [Integer] -&gt; [Integer]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498685"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498677"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498683"><span class="hs-identifier hs-var">sN</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498675"><span class="hs-identifier hs-var">mUpN'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498673"><span class="hs-identifier hs-var">mDnN'</span></a></span><span>
</span><span id="line-912"></span><span>
</span><span id="line-913"></span><span>  </span><span id="local-6989586621679498666"><span class="annot"><span class="annottext">rds :: [Integer]
</span><a href="#local-6989586621679498666"><span class="hs-identifier hs-var hs-var">rds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-914"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498722"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-915"></span><span>      </span><span class="annot"><span class="annottext">[Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
</span><a href="#local-6989586621679498686"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498727"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498726"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498722"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498725"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498724"><span class="hs-identifier hs-var">mDn</span></a></span><span>
</span><span id="line-916"></span><span>   </span><span class="hs-keyword">else</span><span>
</span><span id="line-917"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498664"><span class="annot"><span class="annottext">bk :: Integer
</span><a href="#local-6989586621679498664"><span class="hs-identifier hs-var hs-var">bk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498785"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498722"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-918"></span><span>     </span><span class="annot"><span class="annottext">[Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
</span><a href="#local-6989586621679498686"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498727"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498664"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498726"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498725"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498664"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498724"><span class="hs-identifier hs-var">mDn</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498664"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-919"></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-920"></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Integer -&gt; Int) -&gt; [Integer] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Integer] -&gt; [Integer]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679498666"><span class="hs-identifier hs-var">rds</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498722"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-921"></span><span>
</span><span id="line-922"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-923"></span><span class="hs-comment">-- Converting from a Rational to a RealFloa</span><span>
</span><span id="line-924"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span class="hs-comment">{-
[In response to a request for documentation of how fromRational works,
Joe Fasel writes:] A quite reasonable request!  This code was added to
the Prelude just before the 1.2 release, when Lennart, working with an
early version of hbi, noticed that (read . show) was not the identity
for floating-point numbers.  (There was a one-bit error about half the
time.)  The original version of the conversion function was in fact
simply a floating-point divide, as you suggest above. The new version
is, I grant you, somewhat denser.

Unfortunately, Joe's code doesn't work!  Here's an example:

main = putStr (shows (1.82173691287639817263897126389712638972163e-300::Double) &quot;\n&quot;)

This program prints
        0.0000000000000000
instead of
        1.8217369128763981e-300

Here's Joe's code:

\begin{pseudocode}
fromRat :: (RealFloat a) =&gt; Rational -&gt; a
fromRat x = x'
        where x' = f e

--              If the exponent of the nearest floating-point number to x
--              is e, then the significand is the integer nearest xb^(-e),
--              where b is the floating-point radix.  We start with a good
--              guess for e, and if it is correct, the exponent of the
--              floating-point number we construct will again be e.  If
--              not, one more iteration is needed.

              f e   = if e' == e then y else f e'
                      where y      = encodeFloat (round (x * (1 % b)^^e)) e
                            (_,e') = decodeFloat y
              b     = floatRadix x'

--              We obtain a trial exponent by doing a floating-point
--              division of x's numerator by its denominator.  The
--              result of this division may not itself be the ultimate
--              result, because of an accumulation of three rounding
--              errors.

              (s,e) = decodeFloat (fromInteger (numerator x) `asTypeOf` x'
                                        / fromInteger (denominator x))
\end{pseudocode}

Now, here's Lennart's code (which works):
-}</span><span>
</span><span id="line-976"></span><span>
</span><span id="line-977"></span><span class="hs-comment">-- | Converts a 'Rational' value into any type in class 'RealFloat'.</span><span>
</span><span id="line-978"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-979"></span><span class="annot"><span class="hs-pragma">&quot;fromRat/Float&quot;</span></span><span>     </span><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-pragma hs-type">fromRat</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Real.html#fromRational"><span class="hs-pragma hs-type">fromRational</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-pragma hs-type">Rational</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-980"></span><span class="annot"><span class="hs-pragma">&quot;fromRat/Double&quot;</span></span><span>    </span><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-pragma hs-type">fromRat</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Real.html#fromRational"><span class="hs-pragma hs-type">fromRational</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-pragma hs-type">Rational</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-981"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-982"></span><span>
</span><span id="line-983"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-pragma hs-type">fromRat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-984"></span><span id="local-6989586621679500221"><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-identifier hs-type">fromRat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500221"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500221"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-985"></span><span>
</span><span id="line-986"></span><span class="hs-comment">-- Deal with special cases first, delegating the real work to fromRat'</span><span>
</span><span id="line-987"></span><span id="fromRat"><span class="annot"><span class="annottext">fromRat :: forall a. RealFloat a =&gt; Rational -&gt; a
</span><a href="GHC.Float.html#fromRat"><span class="hs-identifier hs-var hs-var">fromRat</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498632"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498632"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-type">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498632"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-comment">-- +Infinity</span><span>
</span><span id="line-988"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498632"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-comment">-- -Infinity</span><span>
</span><span id="line-989"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>        </span><span class="hs-comment">-- NaN</span><span>
</span><span id="line-990"></span><span>
</span><span id="line-991"></span><span class="annot"><a href="GHC.Float.html#fromRat"><span class="hs-identifier hs-var">fromRat</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679498631"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498631"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-type">:%</span></a></span><span> </span><span id="local-6989586621679498630"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498630"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498631"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. RealFloat a =&gt; Rational -&gt; a
</span><a href="GHC.Float.html#fromRat%27"><span class="hs-identifier hs-var">fromRat'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498631"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498630"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-992"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498631"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. RealFloat a =&gt; Rational -&gt; a
</span><a href="GHC.Float.html#fromRat%27"><span class="hs-identifier hs-var">fromRat'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498631"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498630"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-993"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>             </span><span class="hs-comment">-- Zero</span><span>
</span><span id="line-994"></span><span>
</span><span id="line-995"></span><span class="hs-comment">-- Conversion process:</span><span>
</span><span id="line-996"></span><span class="hs-comment">-- Scale the rational number by the RealFloat base until</span><span>
</span><span id="line-997"></span><span class="hs-comment">-- it lies in the range of the mantissa (as used by decodeFloat/encodeFloat).</span><span>
</span><span id="line-998"></span><span class="hs-comment">-- Then round the rational to an Integer and encode it with the exponent</span><span>
</span><span id="line-999"></span><span class="hs-comment">-- that we got from the scaling.</span><span>
</span><span id="line-1000"></span><span class="hs-comment">-- To speed up the scaling process we compute the log2 of the number to get</span><span>
</span><span id="line-1001"></span><span class="hs-comment">-- a first guess of the exponent.</span><span>
</span><span id="line-1002"></span><span>
</span><span id="line-1003"></span><span id="local-6989586621679498628"><span class="annot"><a href="GHC.Float.html#fromRat%27"><span class="hs-identifier hs-type">fromRat'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679498628"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679498628"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1004"></span><span class="hs-comment">-- Invariant: argument is strictly positive</span><span>
</span><span id="line-1005"></span><span id="fromRat%27"><span class="annot"><span class="annottext">fromRat' :: forall a. RealFloat a =&gt; Rational -&gt; a
</span><a href="GHC.Float.html#fromRat%27"><span class="hs-identifier hs-var hs-var">fromRat'</span></a></span></span><span> </span><span id="local-6989586621679498626"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498626"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498625"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1006"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679498597"><span class="annot"><span class="annottext">b :: Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Integer
forall a. RealFloat a =&gt; a -&gt; Integer
</span><a href="GHC.Float.html#floatRadix"><span class="hs-identifier hs-var">floatRadix</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498625"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1007"></span><span>        </span><span id="local-6989586621679498596"><span class="annot"><span class="annottext">p :: Int
</span><a href="#local-6989586621679498596"><span class="hs-identifier hs-var hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498625"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1008"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679498595"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498595"><span class="hs-identifier hs-var">minExp0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int, Int)
forall a. RealFloat a =&gt; a -&gt; (Int, Int)
</span><a href="GHC.Float.html#floatRange"><span class="hs-identifier hs-var">floatRange</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498625"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1009"></span><span>        </span><span id="local-6989586621679498594"><span class="annot"><span class="annottext">minExp :: Int
</span><a href="#local-6989586621679498594"><span class="hs-identifier hs-var hs-var">minExp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498595"><span class="hs-identifier hs-var">minExp0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498596"><span class="hs-identifier hs-var">p</span></a></span><span>            </span><span class="hs-comment">-- the real minimum exponent</span><span>
</span><span id="line-1010"></span><span>        </span><span id="local-6989586621679498593"><span class="annot"><span class="annottext">xMax :: Rational
</span><a href="#local-6989586621679498593"><span class="hs-identifier hs-var hs-var">xMax</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Rational
forall a. Real a =&gt; a -&gt; Rational
</span><a href="GHC.Real.html#toRational"><span class="hs-identifier hs-var">toRational</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498596"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1011"></span><span>        </span><span id="local-6989586621679498592"><span class="annot"><span class="annottext">ln :: Int
</span><a href="#local-6989586621679498592"><span class="hs-identifier hs-var hs-var">ln</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerLogBase%23"><span class="hs-identifier hs-var">integerLogBase#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; Integer
forall a. Ratio a -&gt; a
</span><a href="GHC.Real.html#numerator"><span class="hs-identifier hs-var">numerator</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498626"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1012"></span><span>        </span><span id="local-6989586621679498589"><span class="annot"><span class="annottext">ld :: Int
</span><a href="#local-6989586621679498589"><span class="hs-identifier hs-var hs-var">ld</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerLogBase%23"><span class="hs-identifier hs-var">integerLogBase#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; Integer
forall a. Ratio a -&gt; a
</span><a href="GHC.Real.html#denominator"><span class="hs-identifier hs-var">denominator</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498626"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1013"></span><span>        </span><span id="local-6989586621679498587"><span class="annot"><span class="annottext">p0 :: Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var hs-var">p0</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498592"><span class="hs-identifier hs-var">ln</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498589"><span class="hs-identifier hs-var">ld</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498596"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-operator hs-var">`max`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498594"><span class="hs-identifier hs-var">minExp</span></a></span><span>
</span><span id="line-1014"></span><span>        </span><span class="hs-comment">-- if x = n/d and ln = integerLogBase b n, ld = integerLogBase b d,</span><span>
</span><span id="line-1015"></span><span>        </span><span class="hs-comment">-- then b^(ln-ld-1) &lt; x &lt; b^(ln-ld+1)</span><span>
</span><span id="line-1016"></span><span>        </span><span id="local-6989586621679498586"><span class="annot"><span class="annottext">f :: Rational
</span><a href="#local-6989586621679498586"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var">p0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%3A%25"><span class="hs-operator hs-var">:%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-1017"></span><span>        </span><span id="local-6989586621679498585"><span class="annot"><span class="annottext">x0 :: Rational
</span><a href="#local-6989586621679498585"><span class="hs-identifier hs-var hs-var">x0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498626"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Rational
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498586"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-1018"></span><span>        </span><span class="hs-comment">-- if ln - ld &gt;= minExp0, then b^(p-1) &lt; x0 &lt; b^(p+1), so there's at most</span><span>
</span><span id="line-1019"></span><span>        </span><span class="hs-comment">-- one scaling step needed, otherwise, x0 &lt; b^p and no scaling is needed</span><span>
</span><span id="line-1020"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679498584"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498584"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498583"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498583"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498585"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498593"><span class="hs-identifier hs-var">xMax</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498585"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Rational
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Rational
forall a. Real a =&gt; a -&gt; Rational
</span><a href="GHC.Real.html#toRational"><span class="hs-identifier hs-var">toRational</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498597"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var">p0</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498585"><span class="hs-identifier hs-var">x0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498587"><span class="hs-identifier hs-var">p0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1021"></span><span>        </span><span id="local-6989586621679498625"><span class="annot"><span class="annottext">r :: a
</span><a href="#local-6989586621679498625"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; Integer
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#round"><span class="hs-identifier hs-var">round</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679498584"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498583"><span class="hs-identifier hs-var">p'</span></a></span><span>
</span><span id="line-1022"></span><span>
</span><span id="line-1023"></span><span class="hs-comment">-- Exponentiation with a cache for the most common numbers.</span><span>
</span><span id="line-1024"></span><span class="annot"><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-type">minExpt</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#maxExpt"><span class="hs-identifier hs-type">maxExpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1025"></span><span id="minExpt"><span class="annot"><span class="annottext">minExpt :: Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var hs-var">minExpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1026"></span><span id="maxExpt"><span class="annot"><span class="annottext">maxExpt :: Int
</span><a href="GHC.Float.html#maxExpt"><span class="hs-identifier hs-var hs-var">maxExpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1100</span></span><span>
</span><span id="line-1027"></span><span>
</span><span id="line-1028"></span><span class="annot"><a href="GHC.Float.html#expt"><span class="hs-identifier hs-type">expt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-1029"></span><span id="expt"><span class="annot"><span class="annottext">expt :: Integer -&gt; Int -&gt; Integer
</span><a href="GHC.Float.html#expt"><span class="hs-identifier hs-var hs-var">expt</span></a></span></span><span> </span><span id="local-6989586621679498580"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498580"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679498579"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1030"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498580"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-1031"></span><span>        </span><span class="annot"><span class="annottext">Array Int Integer
</span><a href="GHC.Float.html#expts"><span class="hs-identifier hs-var">expts</span></a></span><span class="annot"><span class="annottext">Array Int Integer -&gt; Int -&gt; Integer
forall i e. Ix i =&gt; Array i e -&gt; i -&gt; e
</span><a href="GHC.Arr.html#%21"><span class="hs-operator hs-var">!</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1032"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-1033"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498580"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-1034"></span><span>            </span><span class="annot"><span class="annottext">Array Int Integer
</span><a href="GHC.Float.html#expts10"><span class="hs-identifier hs-var">expts10</span></a></span><span class="annot"><span class="annottext">Array Int Integer -&gt; Int -&gt; Integer
forall i e. Ix i =&gt; Array i e -&gt; i -&gt; e
</span><a href="GHC.Arr.html#%21"><span class="hs-operator hs-var">!</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1035"></span><span>        </span><span class="hs-keyword">else</span><span>
</span><span id="line-1036"></span><span>            </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498580"><span class="hs-identifier hs-var">base</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498579"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1037"></span><span>
</span><span id="line-1038"></span><span class="annot"><a href="GHC.Float.html#expts"><span class="hs-identifier hs-type">expts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Arr.html#Array"><span class="hs-identifier hs-type">Array</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-1039"></span><span id="expts"><span class="annot"><span class="annottext">expts :: Array Int Integer
</span><a href="GHC.Float.html#expts"><span class="hs-identifier hs-var hs-var">expts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, Integer)] -&gt; Array Int Integer
forall i e. Ix i =&gt; (i, i) -&gt; [(i, e)] -&gt; Array i e
</span><a href="GHC.Arr.html#array"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498573"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498573"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679498573"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498573"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-1040"></span><span>
</span><span id="line-1041"></span><span class="annot"><a href="GHC.Float.html#maxExpt10"><span class="hs-identifier hs-type">maxExpt10</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1042"></span><span id="maxExpt10"><span class="annot"><span class="annottext">maxExpt10 :: Int
</span><a href="GHC.Float.html#maxExpt10"><span class="hs-identifier hs-var hs-var">maxExpt10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">324</span></span><span>
</span><span id="line-1043"></span><span>
</span><span id="line-1044"></span><span class="annot"><a href="GHC.Float.html#expts10"><span class="hs-identifier hs-type">expts10</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Arr.html#Array"><span class="hs-identifier hs-type">Array</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-1045"></span><span id="expts10"><span class="annot"><span class="annottext">expts10 :: Array Int Integer
</span><a href="GHC.Float.html#expts10"><span class="hs-identifier hs-var hs-var">expts10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, Integer)] -&gt; Array Int Integer
forall i e. Ix i =&gt; (i, i) -&gt; [(i, e)] -&gt; Array i e
</span><a href="GHC.Arr.html#array"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498572"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498572"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679498572"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498572"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Float.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-1046"></span><span>
</span><span id="line-1047"></span><span class="hs-comment">{-
Unfortunately, the old conversion code was awfully slow due to
a) a slow integer logarithm
b) repeated calculation of gcd's

For the case of Rational's coming from a Float or Double via toRational,
we can exploit the fact that the denominator is a power of two, which for
these brings a huge speedup since we need only shift and add instead
of division.

The below is an adaption of fromRat' for the conversion to
Float or Double exploiting the known floatRadix and avoiding
divisions as much as possible.
-}</span><span>
</span><span id="line-1061"></span><span>
</span><span id="line-1062"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="GHC.Float.html#fromRat%27%27"><span class="hs-pragma hs-type">fromRat''</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">,</span><span>
</span><span id="line-1063"></span><span>                            </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1064"></span><span id="local-6989586621679500277"><span class="annot"><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-type">fromRat''</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500277"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500277"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1065"></span><span class="hs-comment">-- Invariant: n and d strictly positive</span><span>
</span><span id="line-1066"></span><span id="fromRat%27%27"><span class="annot"><span class="annottext">fromRat'' :: forall a. RealFloat a =&gt; Int -&gt; Int -&gt; Integer -&gt; Integer -&gt; a
</span><a href="GHC.Float.html#fromRat%27%27"><span class="hs-identifier hs-var hs-var">fromRat''</span></a></span></span><span> </span><span id="local-6989586621679498546"><span class="annot"><span class="annottext">minEx :: Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679498545"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498545"><span class="hs-identifier hs-var">me#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679498544"><span class="annot"><span class="annottext">mantDigs :: Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679498543"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679498542"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679498541"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1067"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# (# #) | Word# #)
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerIsPowerOf2%23"><span class="hs-identifier hs-var">integerIsPowerOf2#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1068"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679498539"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498539"><span class="hs-identifier hs-var">ldw#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1069"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498538"><span class="annot"><span class="annottext">ld# :: Int#
</span><a href="#local-6989586621679498538"><span class="hs-identifier hs-var hs-var">ld#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498539"><span class="hs-identifier hs-var">ldw#</span></a></span><span>
</span><span id="line-1070"></span><span>          </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerLog2%23"><span class="hs-identifier hs-var">integerLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1071"></span><span>            </span><span id="local-6989586621679498536"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498538"><span class="hs-identifier hs-var">ld#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498545"><span class="hs-identifier hs-var">me#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1072"></span><span>                  </span><span class="hs-comment">-- this means n/d &gt;= 2^(minEx-1), i.e. we are guaranteed to get</span><span>
</span><span id="line-1073"></span><span>                  </span><span class="hs-comment">-- a normalised number, round to mantDigs bits</span><span>
</span><span id="line-1074"></span><span>                  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1075"></span><span>                    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498538"><span class="hs-identifier hs-var">ld#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1076"></span><span>                    </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498533"><span class="annot"><span class="annottext">n' :: Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var hs-var">n'</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1077"></span><span>                             </span><span id="local-6989586621679498524"><span class="annot"><span class="annottext">n'' :: Integer
</span><a href="#local-6989586621679498524"><span class="hs-identifier hs-var hs-var">n''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; Int#
</span><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var">roundingMode#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1078"></span><span>                                    </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var">n'</span></a></span><span>
</span><span id="line-1079"></span><span>                                    </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">2#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-1080"></span><span>                                    </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1081"></span><span>                                            </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var">n'</span></a></span><span>
</span><span id="line-1082"></span><span>                                            </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498533"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-1083"></span><span>                         </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498524"><span class="hs-identifier hs-var">n''</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498538"><span class="hs-identifier hs-var">ld#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1084"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1085"></span><span>                  </span><span class="hs-comment">-- n/d &lt; 2^(minEx-1), a denorm or rounded to 2^(minEx-1)</span><span>
</span><span id="line-1086"></span><span>                  </span><span class="hs-comment">-- the exponent for encoding is always minEx-mantDigs</span><span>
</span><span id="line-1087"></span><span>                  </span><span class="hs-comment">-- so we must shift right by (minEx-mantDigs) - (-ld)</span><span>
</span><span id="line-1088"></span><span>                  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498538"><span class="hs-identifier hs-var">ld#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498545"><span class="hs-identifier hs-var">me#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1089"></span><span>                    </span><span id="local-6989586621679498521"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%3D%23"><span class="hs-operator hs-var">&lt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-comment">-- we would shift left, so we don't shift</span><span>
</span><span id="line-1090"></span><span>                           </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498545"><span class="hs-identifier hs-var">me#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498543"><span class="hs-identifier hs-var">md#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1091"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%3D%23"><span class="hs-operator hs-var">&lt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1092"></span><span>                           </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498519"><span class="annot"><span class="annottext">n' :: Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var hs-var">n'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1093"></span><span>                           </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; Int#
</span><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var">roundingMode#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1094"></span><span>                                </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1095"></span><span>                                </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1096"></span><span>                                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1097"></span><span>                                        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1098"></span><span>                                </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498519"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1099"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498521"><span class="hs-identifier hs-var">ld'#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498536"><span class="hs-identifier hs-var">ln#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-comment">-- result of shift &lt; 0.5</span><span>
</span><span id="line-1100"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-comment">-- first bit of n shifted to 0.5 place</span><span>
</span><span id="line-1101"></span><span>                           </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; (# (# #) | Word# #)
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerIsPowerOf2%23"><span class="hs-identifier hs-var">integerIsPowerOf2#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1102"></span><span>                            </span><span class="hs-special">(#</span><span>       </span><span class="hs-glyph">|</span><span>  </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-comment">-- round to even</span><span>
</span><span id="line-1103"></span><span>                            </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span>    </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1104"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1105"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679498518"><span class="annot"><span class="annottext">ln :: Int
</span><a href="#local-6989586621679498518"><span class="hs-identifier hs-var hs-var">ln</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerLog2%23"><span class="hs-identifier hs-var">integerLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1106"></span><span>              </span><span id="local-6989586621679498517"><span class="annot"><span class="annottext">ld :: Int
</span><a href="#local-6989586621679498517"><span class="hs-identifier hs-var hs-var">ld</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#integerLog2%23"><span class="hs-identifier hs-var">integerLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1107"></span><span>              </span><span class="hs-comment">-- 2^(ln-ld-1) &lt; n/d &lt; 2^(ln-ld+1)</span><span>
</span><span id="line-1108"></span><span>              </span><span id="local-6989586621679498514"><span class="annot"><span class="annottext">p0 :: Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var hs-var">p0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498546"><span class="hs-identifier hs-var">minEx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498518"><span class="hs-identifier hs-var">ln</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498517"><span class="hs-identifier hs-var">ld</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1109"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621679498507"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498507"><span class="hs-identifier hs-var">n'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498506"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498506"><span class="hs-identifier hs-var">d'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1110"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var">p0</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1111"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1112"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498542"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498541"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var">p0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1113"></span><span>              </span><span class="hs-comment">-- if ln-ld &lt; minEx, then n'/d' &lt; 2^mantDigs, else</span><span>
</span><span id="line-1114"></span><span>              </span><span class="hs-comment">-- 2^(mantDigs-1) &lt; n'/d' &lt; 2^(mantDigs+1) and we</span><span>
</span><span id="line-1115"></span><span>              </span><span class="hs-comment">-- may need one scaling step</span><span>
</span><span id="line-1116"></span><span>              </span><span id="local-6989586621679498497"><span class="annot"><span class="annottext">scale :: a -&gt; c -&gt; c -&gt; (a, c, c)
</span><a href="#local-6989586621679498497"><span class="hs-identifier hs-var hs-var">scale</span></a></span></span><span> </span><span id="local-6989586621679498496"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498496"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679498495"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498495"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679498494"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498494"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-1117"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498494"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; Int -&gt; c
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">c -&gt; c -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498495"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498496"><span class="hs-identifier hs-var">p</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498495"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498494"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; Int -&gt; c
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-1118"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498496"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498495"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679498494"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1119"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621679498489"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498489"><span class="hs-identifier hs-var">p'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498488"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498488"><span class="hs-identifier hs-var">n''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679498487"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498487"><span class="hs-identifier hs-var">d''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer -&gt; Integer -&gt; (Int, Integer, Integer)
forall {c} {a}. (Ord c, Bits c, Num a) =&gt; a -&gt; c -&gt; c -&gt; (a, c, c)
</span><a href="#local-6989586621679498497"><span class="hs-identifier hs-var">scale</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498514"><span class="hs-identifier hs-var">p0</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498544"><span class="hs-identifier hs-var">mantDigs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498507"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498506"><span class="hs-identifier hs-var">d'</span></a></span><span>
</span><span id="line-1120"></span><span>              </span><span class="hs-comment">-- n''/d'' &lt; 2^mantDigs and p' == minEx-mantDigs or n''/d'' &gt;= 2^(mantDigs-1)</span><span>
</span><span id="line-1121"></span><span>              </span><span id="local-6989586621679498475"><span class="annot"><span class="annottext">rdq :: Integer
</span><a href="#local-6989586621679498475"><span class="hs-identifier hs-var hs-var">rdq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498488"><span class="hs-identifier hs-var">n''</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; (Integer, Integer)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="GHC.Real.html#quotRem"><span class="hs-operator hs-var">`quotRem`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498487"><span class="hs-identifier hs-var">d''</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1122"></span><span>                     </span><span class="hs-special">(</span><span id="local-6989586621679498474"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679498473"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498473"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498473"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498487"><span class="hs-identifier hs-var">d''</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1123"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-1124"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1125"></span><span>                                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-1126"></span><span>                                </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498474"><span class="hs-identifier hs-var">q</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-1127"></span><span>          </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; a
forall a. RealFloat a =&gt; Integer -&gt; Int -&gt; a
</span><a href="GHC.Float.html#encodeFloat"><span class="hs-identifier hs-var">encodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679498475"><span class="hs-identifier hs-var">rdq</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498489"><span class="hs-identifier hs-var">p'</span></a></span><span>
</span><span id="line-1128"></span><span>
</span><span id="line-1129"></span><span class="hs-comment">-- Assumption: Integer and Int# are strictly positive, Int# is less</span><span>
</span><span id="line-1130"></span><span class="hs-comment">-- than logBase 2 of Integer, otherwise havoc ensues.</span><span>
</span><span id="line-1131"></span><span class="hs-comment">-- Used only for the numerator in fromRational when the denominator</span><span>
</span><span id="line-1132"></span><span class="hs-comment">-- is a power of 2.</span><span>
</span><span id="line-1133"></span><span class="hs-comment">-- The Int# argument is log2 n minus the number of bits in the mantissa</span><span>
</span><span id="line-1134"></span><span class="hs-comment">-- of the target type, i.e. the index of the first non-integral bit in</span><span>
</span><span id="line-1135"></span><span class="hs-comment">-- the quotient.</span><span>
</span><span id="line-1136"></span><span class="hs-comment">--</span><span>
</span><span id="line-1137"></span><span class="hs-comment">-- 0# means round down (towards zero)</span><span>
</span><span id="line-1138"></span><span class="hs-comment">-- 1# means we have a half-integer, round to even</span><span>
</span><span id="line-1139"></span><span class="hs-comment">-- 2# means round up (away from zero)</span><span>
</span><span id="line-1140"></span><span class="annot"><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-type">roundingMode#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-1141"></span><span id="roundingMode%23"><span class="annot"><span class="annottext">roundingMode# :: Integer -&gt; Int# -&gt; Int#
</span><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var hs-var">roundingMode#</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IS"><span class="hs-identifier hs-type">IS</span></a></span><span> </span><span id="local-6989586621679498472"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498472"><span class="hs-identifier hs-var">i#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679498471"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498471"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1142"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1143"></span><span>      </span><span id="local-6989586621679498470"><span class="annot"><span class="annottext">k :: Word#
</span><a href="#local-6989586621679498470"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498472"><span class="hs-identifier hs-var">i#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-identifier hs-var">uncheckedShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498471"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1144"></span><span>      </span><span id="local-6989586621679498469"><span class="annot"><span class="annottext">c :: Word#
</span><a href="#local-6989586621679498469"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-identifier hs-var">uncheckedShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498471"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-1145"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498469"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtWord%23"><span class="hs-operator hs-var">`gtWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498470"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1146"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-1147"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498469"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltWord%23"><span class="hs-operator hs-var">`ltWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498470"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1148"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">2#</span></span><span>
</span><span id="line-1149"></span><span>                 </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-1150"></span><span>
</span><span id="line-1151"></span><span class="annot"><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var">roundingMode#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IN"><span class="hs-identifier hs-type">IN</span></a></span><span> </span><span id="local-6989586621679498468"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679498468"><span class="hs-identifier hs-var">bn</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679498467"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498467"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int# -&gt; Int#
</span><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var">roundingMode#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteArray# -&gt; Integer
</span><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IP"><span class="hs-identifier hs-var">IP</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679498468"><span class="hs-identifier hs-var">bn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498467"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-comment">-- dummy</span><span>
</span><span id="line-1152"></span><span class="annot"><a href="GHC.Float.html#roundingMode%23"><span class="hs-identifier hs-var">roundingMode#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#IP"><span class="hs-identifier hs-type">IP</span></a></span><span> </span><span id="local-6989586621679498466"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679498466"><span class="hs-identifier hs-var">bn</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679498465"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498465"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1153"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-1154"></span><span>      </span><span id="local-6989586621679498464"><span class="annot"><span class="annottext">j :: Int#
</span><a href="#local-6989586621679498464"><span class="hs-identifier hs-var hs-var">j</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498465"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-identifier">MMASK##</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- index of relevant bit in word</span><span>
</span><span id="line-1155"></span><span>      </span><span id="local-6989586621679498463"><span class="annot"><span class="annottext">k :: Int#
</span><a href="#local-6989586621679498463"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftRA%23"><span class="hs-identifier hs-var">uncheckedIShiftRA#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498465"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-identifier">WSHIFT#</span><span>           </span><span class="hs-comment">-- index of relevant word</span><span>
</span><span id="line-1156"></span><span>      </span><span id="local-6989586621679498462"><span class="annot"><span class="annottext">r :: Word#
</span><a href="#local-6989586621679498462"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679498466"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498463"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-identifier hs-var">uncheckedShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498464"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusWord%23"><span class="hs-operator hs-var">`minusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-1157"></span><span>      </span><span id="local-6989586621679498460"><span class="annot"><span class="annottext">c :: Word#
</span><a href="#local-6989586621679498460"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-identifier hs-var">uncheckedShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498464"><span class="hs-identifier hs-var">j</span></a></span><span>
</span><span id="line-1158"></span><span>      </span><span id="local-6989586621679498459"><span class="annot"><span class="annottext">test :: Int# -&gt; Int#
</span><a href="#local-6989586621679498459"><span class="hs-identifier hs-var hs-var">test</span></a></span></span><span> </span><span id="local-6989586621679498458"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498458"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498458"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1159"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-1160"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteArray# -&gt; Int# -&gt; Word#
</span><a href="../../ghc-bignum/src/GHC.Num.BigNat.html#bigNatIndex%23"><span class="hs-identifier hs-var">bigNatIndex#</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679498466"><span class="hs-identifier hs-var">bn</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498458"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1161"></span><span>                          </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="#local-6989586621679498459"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498458"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1162"></span><span>                          </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">2#</span></span><span>
</span><span id="line-1163"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498460"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtWord%23"><span class="hs-operator hs-var">`gtWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498462"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1164"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-1165"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498460"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltWord%23"><span class="hs-operator hs-var">`ltWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498462"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1166"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">2#</span></span><span>
</span><span id="line-1167"></span><span>                 </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int#
</span><a href="#local-6989586621679498459"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679498463"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-1168"></span><span>
</span><span id="line-1169"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-1170"></span><span class="hs-comment">-- Floating point numeric primops</span><span>
</span><span id="line-1171"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-1172"></span><span>
</span><span id="line-1173"></span><span class="hs-comment">-- Definitions of the boxed PrimOps; these will be</span><span>
</span><span id="line-1174"></span><span class="hs-comment">-- used in the case of partial applications, etc.</span><span>
</span><span id="line-1175"></span><span>
</span><span id="line-1176"></span><span class="annot"><a href="GHC.Float.html#plusFloat"><span class="hs-identifier hs-type">plusFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#minusFloat"><span class="hs-identifier hs-type">minusFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#timesFloat"><span class="hs-identifier hs-type">timesFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#divideFloat"><span class="hs-identifier hs-type">divideFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1177"></span><span id="plusFloat"><span class="annot"><span class="annottext">plusFloat :: Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#plusFloat"><span class="hs-identifier hs-var hs-var">plusFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498457"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498457"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498456"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498456"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusFloat%23"><span class="hs-identifier hs-var">plusFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498457"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498456"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1178"></span><span id="minusFloat"><span class="annot"><span class="annottext">minusFloat :: Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#minusFloat"><span class="hs-identifier hs-var hs-var">minusFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498455"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498455"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498454"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498454"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#minusFloat%23"><span class="hs-identifier hs-var">minusFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498454"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1179"></span><span id="timesFloat"><span class="annot"><span class="annottext">timesFloat :: Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#timesFloat"><span class="hs-identifier hs-var hs-var">timesFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498453"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498453"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498452"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498452"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesFloat%23"><span class="hs-identifier hs-var">timesFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498453"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498452"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1180"></span><span id="divideFloat"><span class="annot"><span class="annottext">divideFloat :: Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#divideFloat"><span class="hs-identifier hs-var hs-var">divideFloat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498451"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498451"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498450"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498450"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#divideFloat%23"><span class="hs-identifier hs-var">divideFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498451"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498450"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1181"></span><span>
</span><span id="line-1182"></span><span class="annot"><a href="GHC.Float.html#negateFloat"><span class="hs-identifier hs-type">negateFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1183"></span><span id="negateFloat"><span class="annot"><span class="annottext">negateFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#negateFloat"><span class="hs-identifier hs-var hs-var">negateFloat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498449"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498449"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateFloat%23"><span class="hs-identifier hs-var">negateFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498449"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1184"></span><span>
</span><span id="line-1185"></span><span class="annot"><a href="GHC.Float.html#gtFloat"><span class="hs-identifier hs-type">gtFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#geFloat"><span class="hs-identifier hs-type">geFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#ltFloat"><span class="hs-identifier hs-type">ltFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#leFloat"><span class="hs-identifier hs-type">leFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-1186"></span><span id="gtFloat"><span class="annot"><span class="annottext">gtFloat :: Float -&gt; Float -&gt; Bool
</span><a href="GHC.Float.html#gtFloat"><span class="hs-identifier hs-var hs-var">gtFloat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498444"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498444"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498443"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498443"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtFloat%23"><span class="hs-identifier hs-var">gtFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498444"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498443"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1187"></span><span id="geFloat"><span class="annot"><span class="annottext">geFloat :: Float -&gt; Float -&gt; Bool
</span><a href="GHC.Float.html#geFloat"><span class="hs-identifier hs-var hs-var">geFloat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498442"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498442"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498441"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498441"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#geFloat%23"><span class="hs-identifier hs-var">geFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498442"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498441"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1188"></span><span id="ltFloat"><span class="annot"><span class="annottext">ltFloat :: Float -&gt; Float -&gt; Bool
</span><a href="GHC.Float.html#ltFloat"><span class="hs-identifier hs-var hs-var">ltFloat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498440"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498440"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498439"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498439"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltFloat%23"><span class="hs-identifier hs-var">ltFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498440"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498439"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1189"></span><span id="leFloat"><span class="annot"><span class="annottext">leFloat :: Float -&gt; Float -&gt; Bool
</span><a href="GHC.Float.html#leFloat"><span class="hs-identifier hs-var hs-var">leFloat</span></a></span></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498438"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498438"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498437"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498437"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#leFloat%23"><span class="hs-identifier hs-var">leFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498438"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498437"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1190"></span><span>
</span><span id="line-1191"></span><span class="annot"><a href="GHC.Float.html#expFloat"><span class="hs-identifier hs-type">expFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#expm1Float"><span class="hs-identifier hs-type">expm1Float</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1192"></span><span class="annot"><a href="GHC.Float.html#logFloat"><span class="hs-identifier hs-type">logFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#log1pFloat"><span class="hs-identifier hs-type">log1pFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#sqrtFloat"><span class="hs-identifier hs-type">sqrtFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#fabsFloat"><span class="hs-identifier hs-type">fabsFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1193"></span><span class="annot"><a href="GHC.Float.html#sinFloat"><span class="hs-identifier hs-type">sinFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#cosFloat"><span class="hs-identifier hs-type">cosFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#tanFloat"><span class="hs-identifier hs-type">tanFloat</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1194"></span><span class="annot"><a href="GHC.Float.html#asinFloat"><span class="hs-identifier hs-type">asinFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#acosFloat"><span class="hs-identifier hs-type">acosFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#atanFloat"><span class="hs-identifier hs-type">atanFloat</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1195"></span><span class="annot"><a href="GHC.Float.html#sinhFloat"><span class="hs-identifier hs-type">sinhFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#coshFloat"><span class="hs-identifier hs-type">coshFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#tanhFloat"><span class="hs-identifier hs-type">tanhFloat</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1196"></span><span class="annot"><a href="GHC.Float.html#asinhFloat"><span class="hs-identifier hs-type">asinhFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#acoshFloat"><span class="hs-identifier hs-type">acoshFloat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#atanhFloat"><span class="hs-identifier hs-type">atanhFloat</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1197"></span><span id="expFloat"><span class="annot"><span class="annottext">expFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#expFloat"><span class="hs-identifier hs-var hs-var">expFloat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498436"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498436"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#expFloat%23"><span class="hs-identifier hs-var">expFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498436"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1198"></span><span id="expm1Float"><span class="annot"><span class="annottext">expm1Float :: Float -&gt; Float
</span><a href="GHC.Float.html#expm1Float"><span class="hs-identifier hs-var hs-var">expm1Float</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498435"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498435"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#expm1Float%23"><span class="hs-identifier hs-var">expm1Float#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498435"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1199"></span><span id="logFloat"><span class="annot"><span class="annottext">logFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#logFloat"><span class="hs-identifier hs-var hs-var">logFloat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498434"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498434"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#logFloat%23"><span class="hs-identifier hs-var">logFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498434"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1200"></span><span id="log1pFloat"><span class="annot"><span class="annottext">log1pFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#log1pFloat"><span class="hs-identifier hs-var hs-var">log1pFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498433"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498433"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#log1pFloat%23"><span class="hs-identifier hs-var">log1pFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498433"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1201"></span><span id="sqrtFloat"><span class="annot"><span class="annottext">sqrtFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#sqrtFloat"><span class="hs-identifier hs-var hs-var">sqrtFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498432"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498432"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sqrtFloat%23"><span class="hs-identifier hs-var">sqrtFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498432"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1202"></span><span id="fabsFloat"><span class="annot"><span class="annottext">fabsFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#fabsFloat"><span class="hs-identifier hs-var hs-var">fabsFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498431"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498431"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#fabsFloat%23"><span class="hs-identifier hs-var">fabsFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498431"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1203"></span><span id="sinFloat"><span class="annot"><span class="annottext">sinFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#sinFloat"><span class="hs-identifier hs-var hs-var">sinFloat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498430"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498430"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sinFloat%23"><span class="hs-identifier hs-var">sinFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498430"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1204"></span><span id="cosFloat"><span class="annot"><span class="annottext">cosFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#cosFloat"><span class="hs-identifier hs-var hs-var">cosFloat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498429"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498429"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#cosFloat%23"><span class="hs-identifier hs-var">cosFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498429"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1205"></span><span id="tanFloat"><span class="annot"><span class="annottext">tanFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#tanFloat"><span class="hs-identifier hs-var hs-var">tanFloat</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498428"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498428"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#tanFloat%23"><span class="hs-identifier hs-var">tanFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498428"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1206"></span><span id="asinFloat"><span class="annot"><span class="annottext">asinFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#asinFloat"><span class="hs-identifier hs-var hs-var">asinFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498427"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498427"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#asinFloat%23"><span class="hs-identifier hs-var">asinFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498427"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1207"></span><span id="acosFloat"><span class="annot"><span class="annottext">acosFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#acosFloat"><span class="hs-identifier hs-var hs-var">acosFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498426"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498426"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#acosFloat%23"><span class="hs-identifier hs-var">acosFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498426"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1208"></span><span id="atanFloat"><span class="annot"><span class="annottext">atanFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#atanFloat"><span class="hs-identifier hs-var hs-var">atanFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498425"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498425"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#atanFloat%23"><span class="hs-identifier hs-var">atanFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498425"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1209"></span><span id="sinhFloat"><span class="annot"><span class="annottext">sinhFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#sinhFloat"><span class="hs-identifier hs-var hs-var">sinhFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498424"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498424"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sinhFloat%23"><span class="hs-identifier hs-var">sinhFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498424"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1210"></span><span id="coshFloat"><span class="annot"><span class="annottext">coshFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#coshFloat"><span class="hs-identifier hs-var hs-var">coshFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498423"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498423"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#coshFloat%23"><span class="hs-identifier hs-var">coshFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498423"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1211"></span><span id="tanhFloat"><span class="annot"><span class="annottext">tanhFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#tanhFloat"><span class="hs-identifier hs-var hs-var">tanhFloat</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498422"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498422"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#tanhFloat%23"><span class="hs-identifier hs-var">tanhFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498422"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1212"></span><span id="asinhFloat"><span class="annot"><span class="annottext">asinhFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#asinhFloat"><span class="hs-identifier hs-var hs-var">asinhFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498421"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498421"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#asinhFloat%23"><span class="hs-identifier hs-var">asinhFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498421"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1213"></span><span id="acoshFloat"><span class="annot"><span class="annottext">acoshFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#acoshFloat"><span class="hs-identifier hs-var hs-var">acoshFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498420"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498420"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#acoshFloat%23"><span class="hs-identifier hs-var">acoshFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498420"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1214"></span><span id="atanhFloat"><span class="annot"><span class="annottext">atanhFloat :: Float -&gt; Float
</span><a href="GHC.Float.html#atanhFloat"><span class="hs-identifier hs-var hs-var">atanhFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498419"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498419"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#atanhFloat%23"><span class="hs-identifier hs-var">atanhFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498419"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1215"></span><span>
</span><span id="line-1216"></span><span class="annot"><a href="GHC.Float.html#powerFloat"><span class="hs-identifier hs-type">powerFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1217"></span><span id="powerFloat"><span class="annot"><span class="annottext">powerFloat :: Float -&gt; Float -&gt; Float
</span><a href="GHC.Float.html#powerFloat"><span class="hs-identifier hs-var hs-var">powerFloat</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498418"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498418"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498417"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498417"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Float# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#powerFloat%23"><span class="hs-identifier hs-var">powerFloat#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498418"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498417"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1218"></span><span>
</span><span id="line-1219"></span><span class="hs-comment">-- definitions of the boxed PrimOps; these will be</span><span>
</span><span id="line-1220"></span><span class="hs-comment">-- used in the case of partial applications, etc.</span><span>
</span><span id="line-1221"></span><span>
</span><span id="line-1222"></span><span class="annot"><a href="GHC.Float.html#plusDouble"><span class="hs-identifier hs-type">plusDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#minusDouble"><span class="hs-identifier hs-type">minusDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#timesDouble"><span class="hs-identifier hs-type">timesDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#divideDouble"><span class="hs-identifier hs-type">divideDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1223"></span><span id="plusDouble"><span class="annot"><span class="annottext">plusDouble :: Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#plusDouble"><span class="hs-identifier hs-var hs-var">plusDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498416"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498416"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498415"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498415"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498416"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23%23"><span class="hs-operator hs-var">+##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498415"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1224"></span><span id="minusDouble"><span class="annot"><span class="annottext">minusDouble :: Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#minusDouble"><span class="hs-identifier hs-var hs-var">minusDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498414"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498414"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498413"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498413"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498414"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23%23"><span class="hs-operator hs-var">-##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498413"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1225"></span><span id="timesDouble"><span class="annot"><span class="annottext">timesDouble :: Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#timesDouble"><span class="hs-identifier hs-var hs-var">timesDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498412"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498412"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498411"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498411"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498412"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2A%23%23"><span class="hs-operator hs-var">*##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498411"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1226"></span><span id="divideDouble"><span class="annot"><span class="annottext">divideDouble :: Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#divideDouble"><span class="hs-identifier hs-var hs-var">divideDouble</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498410"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498410"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498409"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498409"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498410"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%23%23"><span class="hs-operator hs-var">/##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498409"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1227"></span><span>
</span><span id="line-1228"></span><span class="annot"><a href="GHC.Float.html#negateDouble"><span class="hs-identifier hs-type">negateDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1229"></span><span id="negateDouble"><span class="annot"><span class="annottext">negateDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#negateDouble"><span class="hs-identifier hs-var hs-var">negateDouble</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498408"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498408"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateDouble%23"><span class="hs-identifier hs-var">negateDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498408"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1230"></span><span>
</span><span id="line-1231"></span><span class="annot"><a href="GHC.Float.html#gtDouble"><span class="hs-identifier hs-type">gtDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#geDouble"><span class="hs-identifier hs-type">geDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#leDouble"><span class="hs-identifier hs-type">leDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#ltDouble"><span class="hs-identifier hs-type">ltDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-1232"></span><span id="gtDouble"><span class="annot"><span class="annottext">gtDouble :: Double -&gt; Double -&gt; Bool
</span><a href="GHC.Float.html#gtDouble"><span class="hs-identifier hs-var hs-var">gtDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498403"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498403"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498402"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498402"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498403"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23%23"><span class="hs-operator hs-var">&gt;##</span></a></span><span>  </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498402"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1233"></span><span id="geDouble"><span class="annot"><span class="annottext">geDouble :: Double -&gt; Double -&gt; Bool
</span><a href="GHC.Float.html#geDouble"><span class="hs-identifier hs-var hs-var">geDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498401"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498401"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498400"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498400"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498401"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23%23"><span class="hs-operator hs-var">&gt;=##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498400"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1234"></span><span id="ltDouble"><span class="annot"><span class="annottext">ltDouble :: Double -&gt; Double -&gt; Bool
</span><a href="GHC.Float.html#ltDouble"><span class="hs-identifier hs-var hs-var">ltDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498399"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498399"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498398"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498398"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498399"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23%23"><span class="hs-operator hs-var">&lt;##</span></a></span><span>  </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498398"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1235"></span><span id="leDouble"><span class="annot"><span class="annottext">leDouble :: Double -&gt; Double -&gt; Bool
</span><a href="GHC.Float.html#leDouble"><span class="hs-identifier hs-var hs-var">leDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498397"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498397"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498396"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498396"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498397"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%3D%23%23"><span class="hs-operator hs-var">&lt;=##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498396"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1236"></span><span>
</span><span id="line-1237"></span><span class="annot"><a href="GHC.Float.html#double2Float"><span class="hs-identifier hs-type">double2Float</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1238"></span><span id="double2Float"><span class="annot"><span class="annottext">double2Float :: Double -&gt; Float
</span><a href="GHC.Float.html#double2Float"><span class="hs-identifier hs-var hs-var">double2Float</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498394"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498394"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#double2Float%23"><span class="hs-identifier hs-var">double2Float#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498394"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1239"></span><span>
</span><span id="line-1240"></span><span class="annot"><a href="GHC.Float.html#float2Double"><span class="hs-identifier hs-type">float2Double</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1241"></span><span id="float2Double"><span class="annot"><span class="annottext">float2Double :: Float -&gt; Double
</span><a href="GHC.Float.html#float2Double"><span class="hs-identifier hs-var hs-var">float2Double</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498392"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498392"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#float2Double%23"><span class="hs-identifier hs-var">float2Double#</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498392"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1242"></span><span>
</span><span id="line-1243"></span><span class="annot"><a href="GHC.Float.html#expDouble"><span class="hs-identifier hs-type">expDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#expm1Double"><span class="hs-identifier hs-type">expm1Double</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1244"></span><span class="annot"><a href="GHC.Float.html#logDouble"><span class="hs-identifier hs-type">logDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#log1pDouble"><span class="hs-identifier hs-type">log1pDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#sqrtDouble"><span class="hs-identifier hs-type">sqrtDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#fabsDouble"><span class="hs-identifier hs-type">fabsDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1245"></span><span class="annot"><a href="GHC.Float.html#sinDouble"><span class="hs-identifier hs-type">sinDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#cosDouble"><span class="hs-identifier hs-type">cosDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#tanDouble"><span class="hs-identifier hs-type">tanDouble</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1246"></span><span class="annot"><a href="GHC.Float.html#asinDouble"><span class="hs-identifier hs-type">asinDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#acosDouble"><span class="hs-identifier hs-type">acosDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#atanDouble"><span class="hs-identifier hs-type">atanDouble</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1247"></span><span class="annot"><a href="GHC.Float.html#sinhDouble"><span class="hs-identifier hs-type">sinhDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#coshDouble"><span class="hs-identifier hs-type">coshDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#tanhDouble"><span class="hs-identifier hs-type">tanhDouble</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1248"></span><span class="annot"><a href="GHC.Float.html#asinhDouble"><span class="hs-identifier hs-type">asinhDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#acoshDouble"><span class="hs-identifier hs-type">acoshDouble</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Float.html#atanhDouble"><span class="hs-identifier hs-type">atanhDouble</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1249"></span><span id="expDouble"><span class="annot"><span class="annottext">expDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#expDouble"><span class="hs-identifier hs-var hs-var">expDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498391"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498391"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#expDouble%23"><span class="hs-identifier hs-var">expDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498391"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1250"></span><span id="expm1Double"><span class="annot"><span class="annottext">expm1Double :: Double -&gt; Double
</span><a href="GHC.Float.html#expm1Double"><span class="hs-identifier hs-var hs-var">expm1Double</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498390"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498390"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#expm1Double%23"><span class="hs-identifier hs-var">expm1Double#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498390"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1251"></span><span id="logDouble"><span class="annot"><span class="annottext">logDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#logDouble"><span class="hs-identifier hs-var hs-var">logDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498389"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498389"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#logDouble%23"><span class="hs-identifier hs-var">logDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498389"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1252"></span><span id="log1pDouble"><span class="annot"><span class="annottext">log1pDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#log1pDouble"><span class="hs-identifier hs-var hs-var">log1pDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498388"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498388"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#log1pDouble%23"><span class="hs-identifier hs-var">log1pDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498388"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1253"></span><span id="sqrtDouble"><span class="annot"><span class="annottext">sqrtDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#sqrtDouble"><span class="hs-identifier hs-var hs-var">sqrtDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498387"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498387"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sqrtDouble%23"><span class="hs-identifier hs-var">sqrtDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1254"></span><span id="fabsDouble"><span class="annot"><span class="annottext">fabsDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#fabsDouble"><span class="hs-identifier hs-var hs-var">fabsDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498386"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498386"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#fabsDouble%23"><span class="hs-identifier hs-var">fabsDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498386"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1255"></span><span id="sinDouble"><span class="annot"><span class="annottext">sinDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#sinDouble"><span class="hs-identifier hs-var hs-var">sinDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498385"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498385"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sinDouble%23"><span class="hs-identifier hs-var">sinDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498385"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1256"></span><span id="cosDouble"><span class="annot"><span class="annottext">cosDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#cosDouble"><span class="hs-identifier hs-var hs-var">cosDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498384"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498384"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#cosDouble%23"><span class="hs-identifier hs-var">cosDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498384"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1257"></span><span id="tanDouble"><span class="annot"><span class="annottext">tanDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#tanDouble"><span class="hs-identifier hs-var hs-var">tanDouble</span></a></span></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498383"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498383"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#tanDouble%23"><span class="hs-identifier hs-var">tanDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498383"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1258"></span><span id="asinDouble"><span class="annot"><span class="annottext">asinDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#asinDouble"><span class="hs-identifier hs-var hs-var">asinDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498382"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498382"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#asinDouble%23"><span class="hs-identifier hs-var">asinDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498382"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1259"></span><span id="acosDouble"><span class="annot"><span class="annottext">acosDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#acosDouble"><span class="hs-identifier hs-var hs-var">acosDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498381"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498381"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#acosDouble%23"><span class="hs-identifier hs-var">acosDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498381"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1260"></span><span id="atanDouble"><span class="annot"><span class="annottext">atanDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#atanDouble"><span class="hs-identifier hs-var hs-var">atanDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498380"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498380"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#atanDouble%23"><span class="hs-identifier hs-var">atanDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498380"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1261"></span><span id="sinhDouble"><span class="annot"><span class="annottext">sinhDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#sinhDouble"><span class="hs-identifier hs-var hs-var">sinhDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498379"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498379"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#sinhDouble%23"><span class="hs-identifier hs-var">sinhDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498379"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1262"></span><span id="coshDouble"><span class="annot"><span class="annottext">coshDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#coshDouble"><span class="hs-identifier hs-var hs-var">coshDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498378"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498378"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#coshDouble%23"><span class="hs-identifier hs-var">coshDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498378"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1263"></span><span id="tanhDouble"><span class="annot"><span class="annottext">tanhDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#tanhDouble"><span class="hs-identifier hs-var hs-var">tanhDouble</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498377"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498377"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#tanhDouble%23"><span class="hs-identifier hs-var">tanhDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498377"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1264"></span><span id="asinhDouble"><span class="annot"><span class="annottext">asinhDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#asinhDouble"><span class="hs-identifier hs-var hs-var">asinhDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498376"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498376"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#asinhDouble%23"><span class="hs-identifier hs-var">asinhDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498376"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1265"></span><span id="acoshDouble"><span class="annot"><span class="annottext">acoshDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#acoshDouble"><span class="hs-identifier hs-var hs-var">acoshDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498375"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498375"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#acoshDouble%23"><span class="hs-identifier hs-var">acoshDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498375"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1266"></span><span id="atanhDouble"><span class="annot"><span class="annottext">atanhDouble :: Double -&gt; Double
</span><a href="GHC.Float.html#atanhDouble"><span class="hs-identifier hs-var hs-var">atanhDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498374"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498374"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#atanhDouble%23"><span class="hs-identifier hs-var">atanhDouble#</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498374"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1267"></span><span>
</span><span id="line-1268"></span><span class="annot"><a href="GHC.Float.html#powerDouble"><span class="hs-identifier hs-type">powerDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1269"></span><span id="powerDouble"><span class="annot"><span class="annottext">powerDouble :: Double -&gt; Double -&gt; Double
</span><a href="GHC.Float.html#powerDouble"><span class="hs-identifier hs-var hs-var">powerDouble</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498373"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498373"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498372"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498372"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498373"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2A%2A%23%23"><span class="hs-operator hs-var">**##</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498372"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1270"></span><span>
</span><span id="line-1271"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isFloatNaN&quot;</span></span><span> </span><span id="isFloatNaN"><span class="annot"><a href="GHC.Float.html#isFloatNaN"><span class="hs-identifier hs-var">isFloatNaN</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1272"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isFloatInfinite&quot;</span></span><span> </span><span id="isFloatInfinite"><span class="annot"><a href="GHC.Float.html#isFloatInfinite"><span class="hs-identifier hs-var">isFloatInfinite</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1273"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isFloatDenormalized&quot;</span></span><span> </span><span id="isFloatDenormalized"><span class="annot"><a href="GHC.Float.html#isFloatDenormalized"><span class="hs-identifier hs-var">isFloatDenormalized</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1274"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isFloatNegativeZero&quot;</span></span><span> </span><span id="isFloatNegativeZero"><span class="annot"><a href="GHC.Float.html#isFloatNegativeZero"><span class="hs-identifier hs-var">isFloatNegativeZero</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1275"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isFloatFinite&quot;</span></span><span> </span><span id="isFloatFinite"><span class="annot"><a href="GHC.Float.html#isFloatFinite"><span class="hs-identifier hs-var">isFloatFinite</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1276"></span><span>
</span><span id="line-1277"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isDoubleNaN&quot;</span></span><span> </span><span id="isDoubleNaN"><span class="annot"><a href="GHC.Float.html#isDoubleNaN"><span class="hs-identifier hs-var">isDoubleNaN</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1278"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isDoubleInfinite&quot;</span></span><span> </span><span id="isDoubleInfinite"><span class="annot"><a href="GHC.Float.html#isDoubleInfinite"><span class="hs-identifier hs-var">isDoubleInfinite</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1279"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isDoubleDenormalized&quot;</span></span><span> </span><span id="isDoubleDenormalized"><span class="annot"><a href="GHC.Float.html#isDoubleDenormalized"><span class="hs-identifier hs-var">isDoubleDenormalized</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1280"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isDoubleNegativeZero&quot;</span></span><span> </span><span id="isDoubleNegativeZero"><span class="annot"><a href="GHC.Float.html#isDoubleNegativeZero"><span class="hs-identifier hs-var">isDoubleNegativeZero</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1281"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;isDoubleFinite&quot;</span></span><span> </span><span id="isDoubleFinite"><span class="annot"><a href="GHC.Float.html#isDoubleFinite"><span class="hs-identifier hs-var">isDoubleFinite</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1282"></span><span>
</span><span id="line-1283"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-1284"></span><span class="hs-comment">-- Coercion rules</span><span>
</span><span id="line-1285"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-1286"></span><span>
</span><span id="line-1287"></span><span class="annot"><a href="GHC.Float.html#word2Double"><span class="hs-identifier hs-type">word2Double</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1288"></span><span id="word2Double"><span class="annot"><span class="annottext">word2Double :: Word -&gt; Double
</span><a href="GHC.Float.html#word2Double"><span class="hs-identifier hs-var hs-var">word2Double</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679498370"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498370"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Double#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Double%23"><span class="hs-identifier hs-var">word2Double#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498370"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1289"></span><span>
</span><span id="line-1290"></span><span class="annot"><a href="GHC.Float.html#word2Float"><span class="hs-identifier hs-type">word2Float</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1291"></span><span id="word2Float"><span class="annot"><span class="annottext">word2Float :: Word -&gt; Float
</span><a href="GHC.Float.html#word2Float"><span class="hs-identifier hs-var hs-var">word2Float</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679498368"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498368"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Float#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Float%23"><span class="hs-identifier hs-var">word2Float#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498368"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1292"></span><span>
</span><span id="line-1293"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-1294"></span><span class="annot"><span class="hs-pragma">&quot;fromIntegral/Int-&gt;Float&quot;</span></span><span>   </span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-pragma hs-type">fromIntegral</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Float"><span class="hs-pragma hs-type">int2Float</span></a></span><span>
</span><span id="line-1295"></span><span class="annot"><span class="hs-pragma">&quot;fromIntegral/Int-&gt;Double&quot;</span></span><span>  </span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-pragma hs-type">fromIntegral</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Double"><span class="hs-pragma hs-type">int2Double</span></a></span><span>
</span><span id="line-1296"></span><span class="annot"><span class="hs-pragma">&quot;fromIntegral/Word-&gt;Float&quot;</span></span><span>  </span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-pragma hs-type">fromIntegral</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.html#word2Float"><span class="hs-pragma hs-type">word2Float</span></a></span><span>
</span><span id="line-1297"></span><span class="annot"><span class="hs-pragma">&quot;fromIntegral/Word-&gt;Double&quot;</span></span><span> </span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-pragma hs-type">fromIntegral</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.html#word2Double"><span class="hs-pragma hs-type">word2Double</span></a></span><span>
</span><span id="line-1298"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Float-&gt;Float&quot;</span></span><span>   </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#id"><span class="hs-pragma hs-type">id</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span>
</span><span id="line-1299"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Float-&gt;Double&quot;</span></span><span>  </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.html#float2Double"><span class="hs-pragma hs-type">float2Double</span></a></span><span>
</span><span id="line-1300"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Double-&gt;Float&quot;</span></span><span>  </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.html#double2Float"><span class="hs-pragma hs-type">double2Float</span></a></span><span>
</span><span id="line-1301"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Double-&gt;Double&quot;</span></span><span> </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Base.html#id"><span class="hs-pragma hs-type">id</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span>
</span><span id="line-1302"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Int-&gt;Double&quot;</span></span><span>    </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Double"><span class="hs-pragma hs-type">int2Double</span></a></span><span>   </span><span class="hs-pragma">-- See Note [realToFrac int-to-float]</span><span>
</span><span id="line-1303"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/Int-&gt;Float&quot;</span></span><span>     </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span>   </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Float.RealFracMethods.html#int2Float"><span class="hs-pragma hs-type">int2Float</span></a></span><span>    </span><span class="hs-pragma">--      ..ditto</span><span>
</span><span id="line-1304"></span><span>    </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1305"></span><span>
</span><span id="line-1306"></span><span class="hs-comment">{-
Note [realToFrac int-to-float]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don found that the RULES for realToFrac/Int-&gt;Double and similarly
Float made a huge difference to some stream-fusion programs.  Here's
an example

      import Data.Array.Vector

      n = 40000000

      main = do
            let c = replicateU n (2::Double)
                a = mapU realToFrac (enumFromToU 0 (n-1) ) :: UArr Double
            print (sumU (zipWithU (*) c a))

Without the RULE we get this loop body:

      case $wtoRational sc_sY4 of ww_aM7 { (# ww1_aM9, ww2_aMa #) -&gt;
      case $wfromRat ww1_aM9 ww2_aMa of tpl_X1P { D# ipv_sW3 -&gt;
      Main.$s$wfold
        (+# sc_sY4 1)
        (+# wild_X1i 1)
        (+## sc2_sY6 (*## 2.0 ipv_sW3))

And with the rule:

     Main.$s$wfold
        (+# sc_sXT 1)
        (+# wild_X1h 1)
        (+## sc2_sXV (*## 2.0 (int2Double# sc_sXT)))

The running time of the program goes from 120 seconds to 0.198 seconds
with the native backend, and 0.143 seconds with the C backend.

A few more details in #2251, and the patch message
&quot;Add RULES for realToFrac from Int&quot;.
-}</span><span>
</span><span id="line-1344"></span><span>
</span><span id="line-1345"></span><span class="hs-comment">-- Utils</span><span>
</span><span id="line-1346"></span><span>
</span><span id="line-1347"></span><span id="local-6989586621679500259"><span class="annot"><a href="GHC.Float.html#showSignedFloat"><span class="hs-identifier hs-type">showSignedFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679500259"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1348"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679500259"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-comment">-- ^ a function that can show unsigned values</span><span>
</span><span id="line-1349"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>                </span><span class="hs-comment">-- ^ the precedence of the enclosing context</span><span>
</span><span id="line-1350"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679500259"><span class="hs-identifier hs-type">a</span></a></span><span>                  </span><span class="hs-comment">-- ^ the value to show</span><span>
</span><span id="line-1351"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#ShowS"><span class="hs-identifier hs-type">ShowS</span></a></span></span><span>
</span><span id="line-1352"></span><span id="showSignedFloat"><span class="annot"><span class="annottext">showSignedFloat :: forall a. RealFloat a =&gt; (a -&gt; ShowS) -&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Float.html#showSignedFloat"><span class="hs-identifier hs-var hs-var">showSignedFloat</span></a></span></span><span> </span><span id="local-6989586621679498355"><span class="annot"><span class="annottext">a -&gt; ShowS
</span><a href="#local-6989586621679498355"><span class="hs-identifier hs-var">showPos</span></a></span></span><span> </span><span id="local-6989586621679498354"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498354"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679498353"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498353"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-1353"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498353"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498353"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-1354"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ShowS -&gt; ShowS
</span><a href="GHC.Show.html#showParen"><span class="hs-identifier hs-var">showParen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498354"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; ShowS
</span><a href="GHC.Show.html#showChar"><span class="hs-identifier hs-var">showChar</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ShowS
</span><a href="#local-6989586621679498355"><span class="hs-identifier hs-var">showPos</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498353"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1355"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ShowS
</span><a href="#local-6989586621679498355"><span class="hs-identifier hs-var">showPos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679498353"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-1356"></span><span>
</span><span id="line-1357"></span><span class="hs-comment">{-
We need to prevent over/underflow of the exponent in encodeFloat when
called from scaleFloat, hence we clamp the scaling parameter.
We must have a large enough range to cover the maximum difference of
exponents returned by decodeFloat.
-}</span><span>
</span><span id="line-1363"></span><span class="annot"><a href="GHC.Float.html#clamp"><span class="hs-identifier hs-type">clamp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-1364"></span><span id="clamp"><span class="annot"><span class="annottext">clamp :: Int -&gt; Int -&gt; Int
</span><a href="GHC.Float.html#clamp"><span class="hs-identifier hs-var hs-var">clamp</span></a></span></span><span> </span><span id="local-6989586621679498350"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498350"><span class="hs-identifier hs-var">bd</span></a></span></span><span> </span><span id="local-6989586621679498349"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498349"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498350"><span class="hs-identifier hs-var">bd</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498350"><span class="hs-identifier hs-var">bd</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679498349"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1365"></span><span>
</span><span id="line-1366"></span><span>
</span><span id="line-1367"></span><span class="hs-comment">{-
Note [Casting from integral to floating point types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To implement something like `reinterpret_cast` from C++ to go from a
floating-point type to an integral type one might naively think that the
following should work:

      cast :: Float -&gt; Word32
      cast (F# f#) = W32# (unsafeCoerce# f#)

Unfortunately that is not the case, because all the `unsafeCoerce#` does is tell
the compiler that the types have changed. When one does the above cast and
tries to operate on the resulting `Word32` the code generator will generate code
that performs an integer/word operation on a floating-point register, which
results in a compile error.

The correct way of implementing `reinterpret_cast` to implement a primpop, but
that requires a unique implementation for all supported archetectures. The next
best solution is to write the value from the source register to memory and then
read it from memory into the destination register and the best way to do that
is using CMM.
-}</span><span>
</span><span id="line-1389"></span><span>
</span><span id="line-1390"></span><span class="hs-comment">-- | @'castWord32ToFloat' w@ does a bit-for-bit copy from an integral value</span><span>
</span><span id="line-1391"></span><span class="hs-comment">-- to a floating-point value.</span><span>
</span><span id="line-1392"></span><span class="hs-comment">--</span><span>
</span><span id="line-1393"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-1394"></span><span>
</span><span id="line-1395"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#castWord32ToFloat"><span class="hs-pragma hs-type">castWord32ToFloat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1396"></span><span class="annot"><a href="GHC.Float.html#castWord32ToFloat"><span class="hs-identifier hs-type">castWord32ToFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-1397"></span><span id="castWord32ToFloat"><span class="annot"><span class="annottext">castWord32ToFloat :: Word32 -&gt; Float
</span><a href="GHC.Float.html#castWord32ToFloat"><span class="hs-identifier hs-var hs-var">castWord32ToFloat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W32%23"><span class="hs-identifier hs-type">W32#</span></a></span><span> </span><span id="local-6989586621679498345"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498345"><span class="hs-identifier hs-var">w#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float# -&gt; Float
</span><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-var">F#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Float#
</span><a href="GHC.Float.html#stgWord32ToFloat"><span class="hs-identifier hs-var">stgWord32ToFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498345"><span class="hs-identifier hs-var">w#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1398"></span><span>
</span><span id="line-1399"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">prim</span></span><span> </span><span class="annot"><span class="hs-string">&quot;stg_word32ToFloatzh&quot;</span></span><span>
</span><span id="line-1400"></span><span>    </span><span id="stgWord32ToFloat"><span class="annot"><a href="GHC.Float.html#stgWord32ToFloat"><span class="hs-identifier hs-var">stgWord32ToFloat</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Float%23"><span class="hs-identifier hs-type">Float#</span></a></span><span>
</span><span id="line-1401"></span><span>
</span><span id="line-1402"></span><span>
</span><span id="line-1403"></span><span class="hs-comment">-- | @'castFloatToWord32' f@ does a bit-for-bit copy from a floating-point value</span><span>
</span><span id="line-1404"></span><span class="hs-comment">-- to an integral value.</span><span>
</span><span id="line-1405"></span><span class="hs-comment">--</span><span>
</span><span id="line-1406"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-1407"></span><span>
</span><span id="line-1408"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#castFloatToWord32"><span class="hs-pragma hs-type">castFloatToWord32</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1409"></span><span class="annot"><a href="GHC.Float.html#castFloatToWord32"><span class="hs-identifier hs-type">castFloatToWord32</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-1410"></span><span id="castFloatToWord32"><span class="annot"><span class="annottext">castFloatToWord32 :: Float -&gt; Word32
</span><a href="GHC.Float.html#castFloatToWord32"><span class="hs-identifier hs-var hs-var">castFloatToWord32</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#F%23"><span class="hs-identifier hs-type">F#</span></a></span><span> </span><span id="local-6989586621679498342"><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498342"><span class="hs-identifier hs-var">f#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word32
</span><a href="GHC.Word.html#W32%23"><span class="hs-identifier hs-var">W32#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float# -&gt; Word#
</span><a href="GHC.Float.html#stgFloatToWord32"><span class="hs-identifier hs-var">stgFloatToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Float#
</span><a href="#local-6989586621679498342"><span class="hs-identifier hs-var">f#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1411"></span><span>
</span><span id="line-1412"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">prim</span></span><span> </span><span class="annot"><span class="hs-string">&quot;stg_floatToWord32zh&quot;</span></span><span>
</span><span id="line-1413"></span><span>    </span><span id="stgFloatToWord32"><span class="annot"><a href="GHC.Float.html#stgFloatToWord32"><span class="hs-identifier hs-var">stgFloatToWord32</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Float%23"><span class="hs-identifier hs-type">Float#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-1414"></span><span>
</span><span id="line-1415"></span><span>
</span><span id="line-1416"></span><span>
</span><span id="line-1417"></span><span class="hs-comment">-- | @'castWord64ToDouble' w@ does a bit-for-bit copy from an integral value</span><span>
</span><span id="line-1418"></span><span class="hs-comment">-- to a floating-point value.</span><span>
</span><span id="line-1419"></span><span class="hs-comment">--</span><span>
</span><span id="line-1420"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-1421"></span><span>
</span><span id="line-1422"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#castWord64ToDouble"><span class="hs-pragma hs-type">castWord64ToDouble</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1423"></span><span class="annot"><a href="GHC.Float.html#castWord64ToDouble"><span class="hs-identifier hs-type">castWord64ToDouble</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-1424"></span><span id="castWord64ToDouble"><span class="annot"><span class="annottext">castWord64ToDouble :: Word64 -&gt; Double
</span><a href="GHC.Float.html#castWord64ToDouble"><span class="hs-identifier hs-var hs-var">castWord64ToDouble</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#W64%23"><span class="hs-identifier hs-type">W64#</span></a></span><span> </span><span id="local-6989586621679498338"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498338"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Double# -&gt; Double
</span><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-var">D#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Double#
</span><a href="GHC.Float.html#stgWord64ToDouble"><span class="hs-identifier hs-var">stgWord64ToDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679498338"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1425"></span><span>
</span><span id="line-1426"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">prim</span></span><span> </span><span class="annot"><span class="hs-string">&quot;stg_word64ToDoublezh&quot;</span></span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 64
</span><span>    </span><span id="stgWord64ToDouble"><span class="annot"><a href="GHC.Float.html#stgWord64ToDouble"><span class="hs-identifier hs-var">stgWord64ToDouble</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">stgWord64ToDouble</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">Word64#</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Double#</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-1433"></span><span>
</span><span id="line-1434"></span><span class="hs-comment">-- | @'castFloatToWord64' f@ does a bit-for-bit copy from a floating-point value</span><span>
</span><span id="line-1435"></span><span class="hs-comment">-- to an integral value.</span><span>
</span><span id="line-1436"></span><span class="hs-comment">--</span><span>
</span><span id="line-1437"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-1438"></span><span>
</span><span id="line-1439"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#castDoubleToWord64"><span class="hs-pragma hs-type">castDoubleToWord64</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-1440"></span><span class="annot"><a href="GHC.Float.html#castDoubleToWord64"><span class="hs-identifier hs-type">castDoubleToWord64</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-1441"></span><span id="castDoubleToWord64"><span class="annot"><span class="annottext">castDoubleToWord64 :: Double -&gt; Word64
</span><a href="GHC.Float.html#castDoubleToWord64"><span class="hs-identifier hs-var hs-var">castDoubleToWord64</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#D%23"><span class="hs-identifier hs-type">D#</span></a></span><span> </span><span id="local-6989586621679498335"><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498335"><span class="hs-identifier hs-var">d#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word64
</span><a href="GHC.Word.html#W64%23"><span class="hs-identifier hs-var">W64#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double# -&gt; Word#
</span><a href="GHC.Float.html#stgDoubleToWord64"><span class="hs-identifier hs-var">stgDoubleToWord64</span></a></span><span> </span><span class="annot"><span class="annottext">Double#
</span><a href="#local-6989586621679498335"><span class="hs-identifier hs-var">d#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1442"></span><span>
</span><span id="line-1443"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">prim</span></span><span> </span><span class="annot"><span class="hs-string">&quot;stg_doubleToWord64zh&quot;</span></span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 64
</span><span>    </span><span id="stgDoubleToWord64"><span class="annot"><a href="GHC.Float.html#stgDoubleToWord64"><span class="hs-identifier hs-var">stgDoubleToWord64</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">stgDoubleToWord64</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">Double#</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Word64#</span><span class="hs-cpp">
#endif
</span></pre></body></html>